fix(ToggleBtn): Make name required

radio buttons must share a name property
This commit is contained in:
Berkeley Martinez
2018-01-18 14:57:04 -08:00
parent 6cf91060fc
commit 3bdf859c73
2 changed files with 4 additions and 1 deletions

View File

@ -80,6 +80,7 @@ export default function EmailSettings({
</Col> </Col>
<Col sm={ 4 }> <Col sm={ 4 }>
<TB <TB
name='monthly-email'
onChange={ toggleMonthlyEmail } onChange={ toggleMonthlyEmail }
value={ sendMonthlyEmail } value={ sendMonthlyEmail }
/> />
@ -95,6 +96,7 @@ export default function EmailSettings({
</Col> </Col>
<Col sm={ 4 }> <Col sm={ 4 }>
<TB <TB
name='notifications-email'
onChange={ toggleNotificationEmail } onChange={ toggleNotificationEmail }
value={ sendNotificationEmail } value={ sendNotificationEmail }
/> />
@ -110,6 +112,7 @@ export default function EmailSettings({
</Col> </Col>
<Col sm={ 4 }> <Col sm={ 4 }>
<TB <TB
name='quincy-email'
onChange={ toggleQuincyEmail } onChange={ toggleQuincyEmail }
value={ sendQuincyEmail } value={ sendQuincyEmail }
/> />

View File

@ -5,7 +5,7 @@ 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, name: PropTypes.string.isRequired,
onChange: PropTypes.func.isRequired, onChange: PropTypes.func.isRequired,
value: PropTypes.bool.isRequired value: PropTypes.bool.isRequired
}; };