Merge branch 'showable-password-return' into 'develop'
ShowablePassword, IconButton: submit on Enter See merge request soapbox-pub/soapbox-fe!919
This commit is contained in:
@ -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 {
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,6 +50,7 @@ exports[`<LoginForm /> renders for Mastodon 1`] = `
|
||||
onMouseLeave={[Function]}
|
||||
tabIndex="0"
|
||||
title="Show password"
|
||||
type="button"
|
||||
>
|
||||
<div
|
||||
style={Object {}}
|
||||
@ -143,6 +144,7 @@ exports[`<LoginForm /> renders for Pleroma 1`] = `
|
||||
onMouseLeave={[Function]}
|
||||
tabIndex="0"
|
||||
title="Show password"
|
||||
type="button"
|
||||
>
|
||||
<div
|
||||
style={Object {}}
|
||||
|
||||
@ -53,6 +53,7 @@ exports[`<LoginPage /> renders correctly on load 1`] = `
|
||||
onMouseLeave={[Function]}
|
||||
tabIndex="0"
|
||||
title="Show password"
|
||||
type="button"
|
||||
>
|
||||
<div
|
||||
style={Object {}}
|
||||
|
||||
Reference in New Issue
Block a user