Sha256: 95733b09e8f79a62ed58d3392883be806dd10089a9cb1afb105e4fd7112eafc4
Contents?: true
Size: 1.05 KB
Versions: 2
Compression:
Stored size: 1.05 KB
Contents
import React, { useState } from 'react' import { Dropdown } from '../../' const DropdownDefault = (props) => { // eslint-disable-next-line no-unused-vars const [selectedOption, setSelectedOption] = useState(); const options = [ { label: "United States", value: "United States", areaCode: "+1", icon: "πΊπΈ", id: "United-states" }, { label: "Ukraine", value: "Ukraine", areaCode: "+380", icon: "πΊπ¦", id: "ukraine" }, { label: "Pakistan", value: "Pakistan", areaCode: "+92", icon: "π΅π°", id: "pakistan" } ]; return ( <div> <Dropdown onSelect={(selectedItem) => setSelectedOption(selectedItem)} options={options} {...props} > <Dropdown.Trigger/> <Dropdown.Container> {options.map((option) => ( <Dropdown.Option key={option.id} option={option} /> ))} </Dropdown.Container> </Dropdown> </div> ) } export default DropdownDefault
Version data entries
2 entries across 2 versions & 2 rubygems