From 90eea3ba2fc4df4ade0cfbcd098547a33d186ea6 Mon Sep 17 00:00:00 2001 From: shiv Date: Fri, 25 Nov 2022 12:14:10 +0900 Subject: [PATCH] Update Input.tsx --- components/src/components/Input/Input.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/src/components/Input/Input.tsx b/components/src/components/Input/Input.tsx index 9f52bf1..cd4f953 100644 --- a/components/src/components/Input/Input.tsx +++ b/components/src/components/Input/Input.tsx @@ -22,7 +22,7 @@ type BaseProps = FieldBaseProps & { suffix?: React.ReactNode tabIndex?: NativeInputProps['tabIndex'] textTransform?: BoxProps['textTransform'] - type?: 'email' | 'number' | 'text' + type?: NativeInputProps['type'] units?: string value?: string | number onBlur?: NativeInputProps['onBlur'] @@ -47,6 +47,12 @@ type WithTypeNumber = { step?: NativeInputProps['step'] } +type WithDate = { + type?: 'datetime-local' + max?: NativeInputProps['max'] + min?: NativeInputProps['min'] +} + type Props = BaseProps & (WithTypeEmail | WithTypeText | WithTypeNumber) export const Input = React.forwardRef(