diff --git a/striker-ui/components/OutlinedLabeledInputWithSelect.tsx b/striker-ui/components/OutlinedLabeledInputWithSelect.tsx index 56cf9fca..c473810c 100644 --- a/striker-ui/components/OutlinedLabeledInputWithSelect.tsx +++ b/striker-ui/components/OutlinedLabeledInputWithSelect.tsx @@ -12,10 +12,7 @@ import { MessageBoxProps } from './MessageBox'; import OutlinedInputWithLabel, { OutlinedInputWithLabelProps, } from './OutlinedInputWithLabel'; -import SelectWithLabel, { - SelectItem, - SelectWithLabelProps, -} from './SelectWithLabel'; +import SelectWithLabel, { SelectWithLabelProps } from './SelectWithLabel'; type OutlinedLabeledInputWithSelectOptionalProps = { inputWithLabelProps?: Partial; diff --git a/striker-ui/components/ProvisionServerDialog.tsx b/striker-ui/components/ProvisionServerDialog.tsx index bb95ad77..ba711e1f 100644 --- a/striker-ui/components/ProvisionServerDialog.tsx +++ b/striker-ui/components/ProvisionServerDialog.tsx @@ -23,7 +23,7 @@ import MessageBox, { MessageBoxProps } from './MessageBox'; import OutlinedInputWithLabel from './OutlinedInputWithLabel'; import OutlinedLabeledInputWithSelect from './OutlinedLabeledInputWithSelect'; import { Panel, PanelHeader } from './Panels'; -import SelectWithLabel, { SelectItem } from './SelectWithLabel'; +import SelectWithLabel from './SelectWithLabel'; import Slider, { SliderProps } from './Slider'; import Spinner from './Spinner'; import { diff --git a/striker-ui/components/SelectWithLabel.tsx b/striker-ui/components/SelectWithLabel.tsx index c9aa356a..b062403a 100644 --- a/striker-ui/components/SelectWithLabel.tsx +++ b/striker-ui/components/SelectWithLabel.tsx @@ -1,4 +1,4 @@ -import { FC, ReactNode } from 'react'; +import { FC } from 'react'; import { Checkbox as MUICheckbox, FormControl as MUIFormControl, @@ -14,14 +14,6 @@ import OutlinedInputLabel, { } from './OutlinedInputLabel'; import Select, { SelectProps } from './Select'; -type SelectItem< - ValueType = string, - DisplayValueType = ValueType | ReactNode, -> = { - displayValue?: DisplayValueType; - value: ValueType; -}; - type SelectWithLabelOptionalProps = { checkItem?: ((value: string) => boolean) | null; disableItem?: ((value: string) => boolean) | null; @@ -110,6 +102,6 @@ const SelectWithLabel: FC = ({ SelectWithLabel.defaultProps = SELECT_WITH_LABEL_DEFAULT_PROPS; -export type { SelectItem, SelectWithLabelProps }; +export type { SelectWithLabelProps }; export default SelectWithLabel; diff --git a/striker-ui/types/SelectWithLabel.d.ts b/striker-ui/types/SelectWithLabel.d.ts new file mode 100644 index 00000000..47957ce9 --- /dev/null +++ b/striker-ui/types/SelectWithLabel.d.ts @@ -0,0 +1,7 @@ +type SelectItem< + ValueType = string, + DisplayValueType = ValueType | import('react').ReactNode, +> = { + displayValue?: DisplayValueType; + value: ValueType; +};