Update sensitive_button_container.js to prevent it becoming disabled when Subject line is active
This commit is contained in:
parent
53d70a98bf
commit
894cd4668f
|
@ -12,7 +12,6 @@ const messages = defineMessages({
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
active: state.getIn(['compose', 'sensitive']),
|
active: state.getIn(['compose', 'sensitive']),
|
||||||
disabled: state.getIn(['compose', 'spoiler']),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch => ({
|
const mapDispatchToProps = dispatch => ({
|
||||||
|
@ -27,13 +26,12 @@ class SensitiveButton extends React.PureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
active: PropTypes.bool,
|
active: PropTypes.bool,
|
||||||
disabled: PropTypes.bool,
|
|
||||||
onClick: PropTypes.func.isRequired,
|
onClick: PropTypes.func.isRequired,
|
||||||
intl: PropTypes.object.isRequired,
|
intl: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { active, disabled, onClick, intl } = this.props;
|
const { active, onClick, intl } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='compose-form__sensitive-button'>
|
<div className='compose-form__sensitive-button'>
|
||||||
|
@ -43,7 +41,6 @@ class SensitiveButton extends React.PureComponent {
|
||||||
type='checkbox'
|
type='checkbox'
|
||||||
checked={active}
|
checked={active}
|
||||||
onChange={onClick}
|
onChange={onClick}
|
||||||
disabled={disabled}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<span className={classNames('checkbox', { active })} />
|
<span className={classNames('checkbox', { active })} />
|
||||||
|
|
Loading…
Reference in New Issue