Sha256: b0f2c94993c0f07b606de34ee3a8cd2595a53ab8989661c4937e6b0b8f6f5535
Contents?: true
Size: 1002 Bytes
Versions: 1644
Compression:
Stored size: 1002 Bytes
Contents
import React, { useState } from 'react' import FormGroup from '../../pb_form_group/_form_group' import SelectableCard from '../../pb_selectable_card/_selectable_card' const FormGroupSelectableCard = (props) => { const [value, setValue] = useState('') const handleSelect = (event) => { setValue(event.target.value) } return ( <div> <FormGroup> <SelectableCard checked={value === 'cat'} inputId="cat1" multi={false} name="animal" onChange={handleSelect} value="cat" {...props} > {'Cat'} </SelectableCard> <SelectableCard checked={value === 'dog'} inputId="dog1" multi={false} name="animal" onChange={handleSelect} value="dog" {...props} > {'Dog'} </SelectableCard> </FormGroup> </div> ) } export default FormGroupSelectableCard
Version data entries
1,644 entries across 1,644 versions & 2 rubygems