Dropdown
Use the Dropdown component to select an item to dropdown list.
import { Dropdown, DropdownItem } from "cherag-ui"'
Usage
  import { COLORS, Div, Dropdown, DropdownItem } from "cherag-ui";

  export default function App() {
    const [selectItem, setSelectItem] = useState<string>();
    return (
      <Dropdown
        onChange={setSelectItem}
        selected={selectItem}
        header="Choose your service"
        w={'50%'}
        borderColor={COLORS.softGray}
      >
        <DropdownItem value="Audio device">Audio device</DropdownItem>
        <DropdownItem value="Video device">Video device</DropdownItem>
        <DropdownItem value="Wifi device">Wifi device</DropdownItem>
      </Dropdown>
    );
  };
      
Choose your service
󱦳
Props
Dropdown propertics
Name
Type
Description
children
React.ReactNode
Child elements of Dropdown.
onChange
(event: GestureResponderEvent) => void
Change Dropdown item to save value to state elements of Dropdown.
selected
string
selected is string state.
width
number
Width of Dropdown container.
fontSize
number
Text of font size of Dropdown.