Sha256: 2ecec615d762b93b81d2413c8674170f727dde1fae9bf90b700fd775432bc47c
Contents?: true
Size: 1 KB
Versions: 6
Compression:
Stored size: 1 KB
Contents
import React, { useState } from 'react' import { Dropdown } from '../..' const DropdownWithCustomPadding = (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} padding="sm" /> ))} </Dropdown> </div> ) } export default DropdownWithCustomPadding
Version data entries
6 entries across 6 versions & 2 rubygems