From 0169f1c8bc5bf9026132893a645accb6b9c688d2 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 25 Feb 2025 20:42:19 +0100 Subject: [PATCH] remove select box component (#159) --- src/Components/Input/SelectBox.tsx | 74 ------------------------------ src/Components/Input/index.tsx | 1 - 2 files changed, 75 deletions(-) delete mode 100644 src/Components/Input/SelectBox.tsx diff --git a/src/Components/Input/SelectBox.tsx b/src/Components/Input/SelectBox.tsx deleted file mode 100644 index f91ed194..00000000 --- a/src/Components/Input/SelectBox.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import InformationCircleIcon from '@heroicons/react/24/outline/InformationCircleIcon' -import { useState } from 'react' - -interface SelectBoxProps { - labelTitle?: string - labelStyle?: string - type?: string - containerStyle?: string - defaultValue: string - placeholder?: string - - updateFormValue: (value: string) => void - - options: { name: string; value: string }[] - labelDescription?: string -} - -/** - * @category Input - */ -export function SelectBox(props: SelectBoxProps) { - const { - labelTitle, - labelDescription, - defaultValue, - containerStyle, - placeholder, - labelStyle, - options, - updateFormValue, - } = props - - const [value, setValue] = useState(defaultValue || '') - - const updateValue = (newValue: string) => { - updateFormValue(newValue) - setValue(newValue) - } - - return ( -
- {labelTitle ? ( - - ) : ( - '' - )} - -
- ) -} diff --git a/src/Components/Input/index.tsx b/src/Components/Input/index.tsx index ecce2b80..2c0c2064 100644 --- a/src/Components/Input/index.tsx +++ b/src/Components/Input/index.tsx @@ -1,3 +1,2 @@ export { TextAreaInput } from './TextAreaInput' export { TextInput } from './TextInput' -export { SelectBox } from './SelectBox'