Files
freeCodeCamp/common/app/routes/settings/components/Locked-Settings.jsx

42 lines
948 B
JavaScript
Raw Normal View History

import React, { PropTypes } from 'react';
import { Button, Row, Col } from 'react-bootstrap';
2016-07-15 14:32:42 -07:00
import classnames from 'classnames';
2017-01-12 06:54:43 +00:00
const propTypes = {
isLocked: PropTypes.bool,
toggle: PropTypes.func.isRequired
};
export default function LockSettings({ isLocked, toggle }) {
const className = classnames({
'positive-20': true,
active: isLocked,
'btn-toggle': true
});
return (
<Row>
<Col xs={ 9 }>
<p className='large-p'>
Make all of my solutions private
<br />
(this disables your certificates)
</p>
</Col>
<Col xs={ 3 }>
<Button
block={ true }
bsSize='lg'
bsStyle='primary'
className={ className }
onClick={ toggle }
>
{ isLocked ? 'On' : 'Off' }
</Button>
</Col>
</Row>
);
2016-07-15 14:32:42 -07:00
}
2017-01-12 06:54:43 +00:00
LockSettings.displayName = 'LockSettings';
LockSettings.propTypes = propTypes;