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