diff options
author | eug-vs <eug-vs@keemail.me> | 2021-04-20 11:01:29 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2021-04-20 11:01:42 +0300 |
commit | 8168218491ef454576079ad119e5deacf879d383 (patch) | |
tree | 9056f990d1bbc587ef490439395f9950b2445f44 /src/components/Select.tsx | |
parent | 50f7d5d888b87f81fd399b677bfd542761091e94 (diff) | |
download | commercel-ui-8168218491ef454576079ad119e5deacf879d383.tar.gz |
refactor: strongly type API Client hooks
Diffstat (limited to 'src/components/Select.tsx')
-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> |