]>
cat aescling's git repositories - mastodon.git/blob - app/javascript/mastodon/components/radio_button.js
1 import React
from 'react';
2 import PropTypes
from 'prop-types';
3 import classNames
from 'classnames';
5 export default class RadioButton
extends React
.PureComponent
{
8 value: PropTypes
.string
.isRequired
,
9 checked: PropTypes
.bool
,
10 name: PropTypes
.string
.isRequired
,
11 onChange: PropTypes
.func
.isRequired
,
12 label: PropTypes
.node
.isRequired
,
16 const { name
, value
, checked
, onChange
, label
} = this.props
;
19 <label className
='radio-button'>
28 <span className
={classNames('radio-button__input', { checked
})} />
This page took 0.129356 seconds and 4 git commands to generate.