Skip to content
Snippets Groups Projects
Verified Commit c9e96668 authored by Defendi Alberto's avatar Defendi Alberto
Browse files

Make rule property optional

Components may not need a rule property. Defaulting to undefined.
parent 8f0ac4ed
No related branches found
No related tags found
1 merge request!56Refined auth flow and new website pages.
...@@ -27,7 +27,7 @@ type Props = { ...@@ -27,7 +27,7 @@ type Props = {
/** /**
* Validation rules. * Validation rules.
*/ */
rules: Partial<unknown>; rules?: Partial<unknown>;
}; };
export const InputField: FC<Props> = (props: Props) => { export const InputField: FC<Props> = (props: Props) => {
...@@ -58,3 +58,7 @@ export const InputField: FC<Props> = (props: Props) => { ...@@ -58,3 +58,7 @@ export const InputField: FC<Props> = (props: Props) => {
/> />
); );
}; };
InputField.defaultProps = {
rules: undefined,
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment