From d4c61d09708d4b0c5333c07a222979cd61ed376a Mon Sep 17 00:00:00 2001 From: Fateh Farooqui Date: Sat, 20 Jul 2024 23:50:40 +0530 Subject: [PATCH] fix: update tsconfig --- docs/README.md | 8 ++++---- src/DropDown.tsx | 2 +- src/dropdown-input.tsx | 2 +- src/dropdown-item.tsx | 2 +- src/index.tsx | 5 +---- src/multi-select-dropdown-item.tsx | 2 +- src/multi-select-dropdown.tsx | 2 +- src/types.ts | 8 ++++---- tsconfig.json | 2 +- 9 files changed, 15 insertions(+), 18 deletions(-) diff --git a/docs/README.md b/docs/README.md index 1a44c24..a674b30 100644 --- a/docs/README.md +++ b/docs/README.md @@ -274,10 +274,10 @@ const styles = StyleSheet.create({ ## Props ```typescript -import type { ForwardRefExoticComponent } from 'react'; -import type { PressableProps, View, ViewStyle } from 'react-native'; -import type { TextInputLabelProp } from 'react-native-paper/lib/typescript/components/TextInput/types'; -import type { TextInputProps } from 'react-native-paper'; +import { ForwardRefExoticComponent } from 'react'; +import { PressableProps, View, ViewStyle } from 'react-native'; +import { TextInputLabelProp } from 'react-native-paper/lib/typescript/components/TextInput/types'; +import { TextInputProps } from 'react-native-paper'; export type DropdownInputProps = { placeholder?: string; diff --git a/src/DropDown.tsx b/src/DropDown.tsx index 9340adf..24443c3 100644 --- a/src/DropDown.tsx +++ b/src/DropDown.tsx @@ -11,7 +11,7 @@ import { import { Menu, TextInput, TouchableRipple } from 'react-native-paper'; import DropdownItem from './dropdown-item'; import DropdownInput from './dropdown-input'; -import type { DropdownProps } from './types'; +import { DropdownProps } from './types'; function Dropdown(props: DropdownProps) { const [enable, setEnable] = useState(false); diff --git a/src/dropdown-input.tsx b/src/dropdown-input.tsx index a0768a7..04396a5 100644 --- a/src/dropdown-input.tsx +++ b/src/dropdown-input.tsx @@ -1,5 +1,5 @@ import { TextInput } from 'react-native-paper'; -import type { DropdownInputProps } from './types'; +import { DropdownInputProps } from './types'; function DropdownInput(props: DropdownInputProps) { const { placeholder, label, rightIcon, selectedLabel, mode, disabled } = diff --git a/src/dropdown-item.tsx b/src/dropdown-item.tsx index ddad3d9..1dbd8a6 100644 --- a/src/dropdown-item.tsx +++ b/src/dropdown-item.tsx @@ -1,7 +1,7 @@ import { useMemo } from 'react'; import { useTheme, Menu, Divider } from 'react-native-paper'; import { Fragment } from 'react/jsx-runtime'; -import type { DropdownItemProps } from './types'; +import { DropdownItemProps } from './types'; function DropdownItem(props: DropdownItemProps) { const { option, width, value, onSelect, toggleMenu, isLast, menuItemTestID } = diff --git a/src/index.tsx b/src/index.tsx index 55ab12c..980ac32 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3,7 +3,7 @@ import DropdownInput from './dropdown-input'; import DropdownItem from './dropdown-item'; import MultiSelectDropdownItem from './multi-select-dropdown-item'; import MultiSelectDropdown from './multi-select-dropdown'; -import type { +import { DropdownInputProps, DropdownItemProps, DropdownProps, @@ -18,9 +18,6 @@ export { DropdownInput, DropdownItem, MultiSelectDropdownItem, -}; - -export type { DropdownInputProps, DropdownItemProps, DropdownProps, diff --git a/src/multi-select-dropdown-item.tsx b/src/multi-select-dropdown-item.tsx index ea5293c..28ea385 100644 --- a/src/multi-select-dropdown-item.tsx +++ b/src/multi-select-dropdown-item.tsx @@ -1,7 +1,7 @@ import { useCallback, useMemo, Fragment } from 'react'; import { useTheme, Menu, Divider, Checkbox } from 'react-native-paper'; import { View, type ViewStyle } from 'react-native'; -import type { MultiSelectDropdownItemProps } from './types'; +import { MultiSelectDropdownItemProps } from './types'; function MultiSelectDropdownItem(props: MultiSelectDropdownItemProps) { const { option, width, value = [], onSelect, isLast, menuItemTestID } = props; diff --git a/src/multi-select-dropdown.tsx b/src/multi-select-dropdown.tsx index 135dae1..0e099cb 100644 --- a/src/multi-select-dropdown.tsx +++ b/src/multi-select-dropdown.tsx @@ -11,7 +11,7 @@ import { import { Menu, TextInput, TouchableRipple } from 'react-native-paper'; import DropdownInput from './dropdown-input'; import MultiSelectDropdownItem from './multi-select-dropdown-item'; -import type { MultiSelectDropdownProps } from './types'; +import { MultiSelectDropdownProps } from './types'; function MultiSelectDropdown(props: MultiSelectDropdownProps) { const [enable, setEnable] = useState(false); diff --git a/src/types.ts b/src/types.ts index 2ba861b..ce50cde 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,7 +1,7 @@ -import type { ForwardRefExoticComponent } from 'react'; -import type { PressableProps, View, ViewStyle } from 'react-native'; -import type { TextInputLabelProp } from 'react-native-paper/lib/typescript/components/TextInput/types'; -import type { TextInputProps } from 'react-native-paper'; +import { ForwardRefExoticComponent } from 'react'; +import { PressableProps, View, ViewStyle } from 'react-native'; +import { TextInputLabelProp } from 'react-native-paper/lib/typescript/components/TextInput/types'; +import { TextInputProps } from 'react-native-paper'; export type DropdownInputProps = { placeholder?: string; diff --git a/tsconfig.json b/tsconfig.json index 9f26ba0..a0ca150 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,6 +23,6 @@ "skipLibCheck": true, "strict": true, "target": "ESNext", - "verbatimModuleSyntax": true + "verbatimModuleSyntax": false } }