Skip to content

Commit

Permalink
refactor(PasswordForm): rename onFormSubmit props to onSubmit
Browse files Browse the repository at this point in the history
  • Loading branch information
olafsulich committed Oct 29, 2024
1 parent 3b49119 commit fb010de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
*/

interface PasswordFormProps {
onFormSubmit: () => void;
onSubmit: () => void;
inputPlaceholder: string;
inputValue: string;
onInputChange: (value: string) => void;
}

export const PasswordForm = ({onFormSubmit, inputPlaceholder, inputValue, onInputChange}: PasswordFormProps) => {
export const PasswordForm = ({onSubmit, inputPlaceholder, inputValue, onInputChange}: PasswordFormProps) => {
return (
<form onSubmit={onFormSubmit}>
<form onSubmit={onSubmit}>
<label htmlFor="modal_pswd" className="visually-hidden">
{inputPlaceholder}
</label>
Expand Down
2 changes: 1 addition & 1 deletion src/script/components/Modals/PrimaryModal/PrimaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ export const PrimaryModalComponent: FC = () => {

{isPassword && (
<PasswordForm
onFormSubmit={() => doAction(confirm, !!closeOnConfirm)}
onSubmit={() => doAction(confirm, !!closeOnConfirm)}
inputPlaceholder={inputPlaceholder}
inputValue={passwordValue}
onInputChange={setPasswordValue}
Expand Down

0 comments on commit fb010de

Please sign in to comment.