fix(Settings/ToggleButton): Name should be a prop
This commit is contained in:
@ -5,18 +5,20 @@ import { ToggleButtonGroup as BSBG, ToggleButton as TB } from 'react-bootstrap';
|
|||||||
import ns from './ns.json';
|
import ns from './ns.json';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
|
name: PropTypes.string,
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
value: PropTypes.bool.isRequired
|
value: PropTypes.bool.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function ToggleButton({
|
export default function ToggleButton({
|
||||||
|
name,
|
||||||
onChange,
|
onChange,
|
||||||
value
|
value
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div className={ `${ns}-container` }>
|
<div className={ `${ns}-container` }>
|
||||||
<BSBG
|
<BSBG
|
||||||
name='monthly-email'
|
name={ name }
|
||||||
onChange={ onChange }
|
onChange={ onChange }
|
||||||
type='radio'
|
type='radio'
|
||||||
>
|
>
|
||||||
|
Reference in New Issue
Block a user