add autofocus prop to button

This commit is contained in:
sawka
2024-01-07 00:30:25 -08:00
parent 8cbee1e1c3
commit f737c2af86
+2
View File
@@ -231,6 +231,7 @@ interface ButtonProps {
rightIcon?: React.ReactNode;
color?: string;
style?: React.CSSProperties;
autoFocus?: boolean;
}
class Button extends React.Component<ButtonProps> {
@@ -257,6 +258,7 @@ class Button extends React.Component<ButtonProps> {
onClick={this.handleClick}
disabled={disabled}
style={style}
autoFocus={this.props.autoFocus}
>
{leftIcon && <span className="icon-left">{leftIcon}</span>}
{children}