diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/Select.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/Select.tsx b/src/components/Select.tsx index e65f8c4..19f2aab 100644 --- a/src/components/Select.tsx +++ b/src/components/Select.tsx @@ -8,13 +8,13 @@ export interface Option { export interface Props extends React.SelectHTMLAttributes<HTMLSelectElement> { label?: string; - options: Option[]; + options?: Option[]; } const focusStyles = 'focus:outline-none focus:shadow focus:border-gray-400'; const baseStyles = 'p-2 border bg-white border-gray-300 rounded-sm'; -const SelectBase: React.FC<Props> = ({ label, options, ...props }) => { +const SelectBase: React.FC<Props> = ({ label, options = [], ...props }) => { return ( <div className="m-2 mb-4 flex flex-col"> <label htmlFor={props?.name} className="mb-1 text-sm text-gray-600">{label}</label> |