Sha256: fb4d4031ed2cac5a9ba13dc9f14a287af89ca264964a37566884a969ba65fbe9
Contents?: true
Size: 1.16 KB
Versions: 1497
Compression:
Stored size: 1.16 KB
Contents
import React, { useState } from 'react' import SelectableCard from '../_selectable_card.tsx' const SelectableCardSingleSelect = (props) => { const [selected, setSelected] = useState(null) const handleSelect = (event) => { setSelected(event.target.value) } return ( <div className="pb--doc-demo-row"> <SelectableCard checked={selected === 'male'} inputId="male1" multi={false} name="gender" onChange={handleSelect} value="male" {...props} > {'Male'} </SelectableCard> <SelectableCard checked={selected === 'female'} inputId="female1" multi={false} name="gender" onChange={handleSelect} value="female" {...props} > {'Female'} </SelectableCard> <SelectableCard checked={selected === 'other'} inputId="other1" multi={false} name="gender" onChange={handleSelect} value="other" {...props} > {'Other'} </SelectableCard> </div> ) } export default SelectableCardSingleSelect
Version data entries
1,497 entries across 1,497 versions & 2 rubygems