Sha256: 3295785809f558ad93f72f698d09d1a116c8c696021bec55df613ab74fd430c2
Contents?: true
Size: 1.38 KB
Versions: 94
Compression:
Stored size: 1.38 KB
Contents
import React, { useState } from 'react' import { Radio } from '../../' const RadioCustom = (props) => { const [choice, setChoice] = useState('power') const handleOnChange = ({ target }) => { setChoice(target.value) } return ( <div> <p> {'Your choice is: '} <code>{choice}</code> </p> <br /> <Radio className="my_custom_class" label="Custom Power" {...props} > <input checked={choice === 'power'} name="custom" onChange={handleOnChange} type="radio" value="power" {...props} /> </Radio> <br /> <Radio className="my_custom_class" label="Custom Nitro" {...props} > <input checked={choice === 'nitro'} name="custom" onChange={handleOnChange} type="radio" value="nitro" {...props} /> </Radio> <br /> <Radio className="my_custom_class" label="Custom Google" {...props} > <input checked={choice === 'google'} name="custom" onChange={handleOnChange} type="radio" value="google" {...props} /> </Radio> </div> ) } export default RadioCustom
Version data entries
94 entries across 94 versions & 1 rubygems