1.2.7 • Published 1 year ago
@seragam-ui/radio v1.2.7
@seragam-ui/radio
A Quick description of the component
Installation
yarn add @seragam-ui/radio
# or
npm i @seragam-ui/radio
Usage
import { Radio, RadioGroup } from '@seragam-ui/radio'
const App = () => {
const [selected, setSelected] = React.useState('jane')
return (
<>
<RadioGroup
name="select-user"
onChange={setSelected}
style={{ flexDirection: 'column' }}
value={selected}
>
<Radio value="john">John Doe</Radio>
<Radio value="jane" style={{ marginTop: 8 }}>
Jane Doe
</Radio>
<Radio value="jono" style={{ marginTop: 8 }}>
Jono Doe
</Radio>
</RadioGroup>
<div>selected user {selected}</div>
</>
)
}
1.2.7
1 year ago