From 8168218491ef454576079ad119e5deacf879d383 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 20 Apr 2021 11:01:29 +0300 Subject: refactor: strongly type API Client hooks --- src/components/Select.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/Select.tsx') 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 { 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 = ({ label, options, ...props }) => { +const SelectBase: React.FC = ({ label, options = [], ...props }) => { return (
-- cgit v1.2.3