|
|
|
@ -12,7 +12,6 @@ const messages = defineMessages({
|
|
|
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
|
|
|
|
active: state.getIn(['compose', 'sensitive']),
|
|
|
|
|
disabled: state.getIn(['compose', 'spoiler']),
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
@ -27,13 +26,12 @@ class SensitiveButton extends React.PureComponent {
|
|
|
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
|
active: PropTypes.bool,
|
|
|
|
|
disabled: PropTypes.bool,
|
|
|
|
|
onClick: PropTypes.func.isRequired,
|
|
|
|
|
intl: PropTypes.object.isRequired,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
const { active, disabled, onClick, intl } = this.props;
|
|
|
|
|
const { active, onClick, intl } = this.props;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className='compose-form__sensitive-button'>
|
|
|
|
@ -43,7 +41,6 @@ class SensitiveButton extends React.PureComponent {
|
|
|
|
|
type='checkbox'
|
|
|
|
|
checked={active}
|
|
|
|
|
onChange={onClick}
|
|
|
|
|
disabled={disabled}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<span className={classNames('checkbox', { active })} />
|
|
|
|
|