sforkowany z mirror/soapbox
ShowablePassword, IconButton: submit on Enter
rodzic
e2df6eff8b
commit
55ba4bd106
|
@ -33,6 +33,7 @@ export default class IconButton extends React.PureComponent {
|
|||
tabIndex: PropTypes.string,
|
||||
text: PropTypes.string,
|
||||
emoji: PropTypes.string,
|
||||
type: PropTypes.string,
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
|
@ -47,6 +48,7 @@ export default class IconButton extends React.PureComponent {
|
|||
onClick: () => {},
|
||||
onMouseEnter: () => {},
|
||||
onMouseLeave: () => {},
|
||||
type: 'button',
|
||||
};
|
||||
|
||||
handleClick = (e) => {
|
||||
|
@ -106,6 +108,7 @@ export default class IconButton extends React.PureComponent {
|
|||
title,
|
||||
text,
|
||||
emoji,
|
||||
type,
|
||||
} = this.props;
|
||||
|
||||
const classes = classNames(className, 'icon-button', {
|
||||
|
@ -134,6 +137,7 @@ export default class IconButton extends React.PureComponent {
|
|||
onMouseLeave={this.props.onMouseLeave}
|
||||
tabIndex={tabIndex}
|
||||
disabled={disabled}
|
||||
type={type}
|
||||
>
|
||||
<div style={src ? {} : style}>
|
||||
{emoji
|
||||
|
@ -163,6 +167,7 @@ export default class IconButton extends React.PureComponent {
|
|||
onMouseLeave={this.props.onMouseLeave}
|
||||
tabIndex={tabIndex}
|
||||
disabled={disabled}
|
||||
type={type}
|
||||
>
|
||||
<div style={src ? {} : style}>
|
||||
{emoji
|
||||
|
|
|
@ -61,4 +61,4 @@ class ShowablePassword extends ImmutablePureComponent {
|
|||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue