diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-01 22:46:07 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-01 22:58:23 +0200 |
| commit | 2b70c89962a18f33995fcca762fed73fd5ce8f28 (patch) | |
| tree | 2176c687b0e21053df9cb9bfde50d78c0a2514fc /src/components/atoms/forms/field.tsx | |
| parent | d177e0c7c61845b516d4a361a21739bb6486b9b5 (diff) | |
chore: add labelled field component
Diffstat (limited to 'src/components/atoms/forms/field.tsx')
| -rw-r--r-- | src/components/atoms/forms/field.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/atoms/forms/field.tsx b/src/components/atoms/forms/field.tsx index 7d1ac93..513d2ba 100644 --- a/src/components/atoms/forms/field.tsx +++ b/src/components/atoms/forms/field.tsx @@ -1,7 +1,7 @@ import { ChangeEvent, FC, SetStateAction } from 'react'; import styles from './forms.module.scss'; -type FieldType = +export type FieldType = | 'datetime-local' | 'email' | 'number' @@ -12,7 +12,7 @@ type FieldType = | 'time' | 'url'; -type FieldProps = { +export type FieldProps = { /** * Field state. Either enabled (false) or disabled (true). */ @@ -20,7 +20,7 @@ type FieldProps = { /** * Field id attribute. */ - id?: string; + id: string; /** * Field maximum value. */ @@ -32,7 +32,7 @@ type FieldProps = { /** * Field name attribute. */ - name?: string; + name: string; /** * Placeholder value. */ |
