Skip to content

Commit

Permalink
Merge pull request #2 from camin-mccluskey/feat/custom-submit-button-…
Browse files Browse the repository at this point in the history
…classname

[FEATURE]: Custom Submit Button Classname
  • Loading branch information
camin-mccluskey authored Aug 23, 2023
2 parents d71b776 + 1c449c1 commit 3c5e336
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-hook-form-multistep",
"description": "Extensible multistep forms for React Hook Form.",
"version": "0.0.6",
"version": "0.0.7",
"private": false,
"author": {
"name": "Camin McCluskey",
Expand Down
4 changes: 3 additions & 1 deletion src/components/SubmitButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import type { FormStepOnSubmit } from '~/types'

type SubmitButtonProps<StepFormData extends FieldValues> = {
label?: string
className?: string
handleSubmit: UseFormHandleSubmit<StepFormData>
onSubmit: FormStepOnSubmit<StepFormData>
disabled: boolean
}

export default function SubmitButton<StepFormData extends FieldValues>({
label = 'Next',
className,
handleSubmit,
onSubmit,
disabled,
Expand All @@ -26,7 +28,7 @@ export default function SubmitButton<StepFormData extends FieldValues>({
})

return (
<button type="submit" disabled={disabled} ref={submitButtonRef}>
<button type="submit" className={className} disabled={disabled} ref={submitButtonRef}>
{label}
</button>
)
Expand Down

0 comments on commit 3c5e336

Please sign in to comment.