Sha256: 0bd5cbad50910d73237cf901ce7916bb8d5480aeb9efe6b6d726d6c22af208a3
Contents?: true
Size: 981 Bytes
Versions: 6
Compression:
Stored size: 981 Bytes
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: "Canada", value: "Canada", areaCode: "+1", icon: "π¨π¦", id: "canada" }, { label: "Pakistan", value: "Pakistan", areaCode: "+92", icon: "π΅π°", id: "pakistan" } ]; return ( <div> <Dropdown onSelect={(selectedItem) => setSelectedOption(selectedItem)} options={options} {...props} > {options.map((option) => ( <Dropdown.Option key={option.id} option={option} /> ))} </Dropdown> </div> ) } export default DropdownDefault
Version data entries
6 entries across 6 versions & 2 rubygems