diff --git a/src/view/com/forms/InputDate/index.android.tsx b/src/view/com/forms/InputDate/index.android.tsx index 76ffa2e56e..a492ad7da9 100644 --- a/src/view/com/forms/InputDate/index.android.tsx +++ b/src/view/com/forms/InputDate/index.android.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {View, TextInputProps, TextStyle, Pressable} from 'react-native' +import {View, TextStyle, Pressable} from 'react-native' import DateTimePicker, { BaseProps as DateTimePickerProps, } from '@react-native-community/datetimepicker' @@ -8,14 +8,13 @@ import {Logo} from '#/view/icons/Logo' import {useTheme, atoms, tokens} from '#/alf' import {Text} from '#/view/com/Typography' import {useInteractionState} from '#/view/com/util/hooks/useInteractionState' -import {BaseProps} from '#/view/com/forms/types' + +import {InputDateProps} from '#/view/com/forms/InputDate/types' import { localizeDate, toSimpleDateString, } from '#/view/com/forms/InputDate/utils' -type Props = Omit & BaseProps - export * as utils from '#/view/com/forms/InputDate/utils' export function InputDate({ @@ -27,7 +26,7 @@ export function InputDate({ accessibilityLabel, accessibilityHint, ...props -}: Props) { +}: InputDateProps) { const labelId = React.useId() const t = useTheme() const [open, setOpen] = React.useState(false) diff --git a/src/view/com/forms/InputDate/index.tsx b/src/view/com/forms/InputDate/index.tsx index 6b3c8b40b9..eb642c3a08 100644 --- a/src/view/com/forms/InputDate/index.tsx +++ b/src/view/com/forms/InputDate/index.tsx @@ -1,16 +1,14 @@ import React from 'react' -import {View, TextInputProps} from 'react-native' +import {View} from 'react-native' import DateTimePicker, { DateTimePickerEvent, } from '@react-native-community/datetimepicker' import {useTheme, atoms} from '#/alf' import {Text} from '#/view/com/Typography' -import {BaseProps} from '#/view/com/forms/types' import {toSimpleDateString} from '#/view/com/forms/InputDate/utils' -type Props = Omit & BaseProps - +import {InputDateProps} from '#/view/com/forms/InputDate/types' export * as utils from '#/view/com/forms/InputDate/utils' /** @@ -27,7 +25,7 @@ export function InputDate({ label, accessibilityLabel, accessibilityHint, -}: Props) { +}: InputDateProps) { const labelId = React.useId() const t = useTheme() const [value, setValue] = React.useState(initialValue) diff --git a/src/view/com/forms/InputDate/index.web.tsx b/src/view/com/forms/InputDate/index.web.tsx index 994a7f509f..33a7473850 100644 --- a/src/view/com/forms/InputDate/index.web.tsx +++ b/src/view/com/forms/InputDate/index.web.tsx @@ -8,11 +8,9 @@ import {useTheme, atoms, tokens} from '#/alf' import {Text} from '#/view/com/Typography' import {useInteractionState} from '#/view/com/util/hooks/useInteractionState' -import {BaseProps} from '#/view/com/forms/types' +import {InputDateProps} from '#/view/com/forms/InputDate/types' import {toSimpleDateString} from '#/view/com/forms/InputDate/utils' -type Props = BaseProps - export * as utils from '#/view/com/forms/InputDate/utils' export function InputDate({ @@ -24,7 +22,7 @@ export function InputDate({ accessibilityLabel, accessibilityHint, ...props -}: Props) { +}: InputDateProps) { const labelId = React.useId() const t = useTheme() const [value, setValue] = React.useState(initialValue) diff --git a/src/view/com/forms/types.ts b/src/view/com/forms/types.ts index 9a4217579b..c43b760b0b 100644 --- a/src/view/com/forms/types.ts +++ b/src/view/com/forms/types.ts @@ -1,4 +1,4 @@ -import {AccessibilityProps, TextInputProps} from 'react-native' +import {AccessibilityProps} from 'react-native' export type RequiredAccessibilityProps = Required @@ -15,8 +15,4 @@ export type BaseProps = Omit< testID: string label?: string hasError?: boolean - /** - * **NOTE:** Available only on web - */ - autoFocus?: TextInputProps['autoFocus'] }