Sha256: 2029f465275ce6526f8f44431e0e3aed7af9406d82ce13a7ddcc7c7134c1ef1a
Contents?: true
Size: 925 Bytes
Versions: 104
Compression:
Stored size: 925 Bytes
Contents
import React, { useState } from 'react' import { FormGroup, SelectableCard } from '../../' 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
104 entries across 104 versions & 1 rubygems