Skip to content

Commit

Permalink
fix: add className and style props to Form component
Browse files Browse the repository at this point in the history
  • Loading branch information
MildTomato committed Apr 6, 2022
1 parent fd84fde commit b306ec7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/Form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ interface Props
handleIsValidating?: any
name?: string
id?: string
className?: string
style?: React.CSSProperties
}

function errorReducer(state: any, action: any) {
Expand Down Expand Up @@ -53,7 +55,13 @@ export default function Form({ validate, ...props }: Props) {
// console.log('touched', formik.touched)

return (
<form id={props.id} name={props.name} onSubmit={formik.handleSubmit}>
<form
id={props.id}
name={props.name}
onSubmit={formik.handleSubmit}
className={props.className}
style={props.style}
>
<FormContextProvider
values={formik.values}
errors={formik.errors}
Expand Down

0 comments on commit b306ec7

Please sign in to comment.