mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
This commit is contained in:
parent
1aae94fedc
commit
bc2a5aaf96
@ -54,10 +54,7 @@ export const CreateAccount = ({ onActionComplete }) => {
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Box
|
||||
as="form"
|
||||
onSubmit={async (event) => {
|
||||
const onSubmit = async (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
try {
|
||||
@ -82,8 +79,10 @@ export const CreateAccount = ({ onActionComplete }) => {
|
||||
},
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
};
|
||||
|
||||
return (
|
||||
<Box as="form" onSubmit={onSubmit}>
|
||||
<FormTextField
|
||||
autoFocus
|
||||
label={t('accountName')}
|
||||
@ -91,6 +90,11 @@ export const CreateAccount = ({ onActionComplete }) => {
|
||||
onChange={(event) => setNewAccountName(event.target.value)}
|
||||
helpText={errorMessage}
|
||||
error={!isValidAccountName}
|
||||
onKeyPress={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
onSubmit(e);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Box display={Display.Flex} marginTop={6} gap={2}>
|
||||
<ButtonSecondary onClick={() => onActionComplete()} block>
|
||||
|
Loading…
x
Reference in New Issue
Block a user