mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -05:00
add mutating css class for project toggle and fix imports
This commit is contained in:
parent
1b0b5a09b9
commit
a88feb5888
1 changed files with 5 additions and 2 deletions
|
@ -3,13 +3,14 @@ import React from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import {connect} from 'react-redux';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import {selectStudioOpenToAll, selectIsFetchingInfo} from '../../redux/studio';
|
||||
import {
|
||||
mutateStudioOpenToAll, selectIsMutatingOpenToAll, selectOpenToAllMutationError
|
||||
} from '../../redux/studio-mutations';
|
||||
|
||||
const ToggleSlider = require('../../components/forms/toggle-slider.jsx');
|
||||
import ToggleSlider from '../../components/forms/toggle-slider.jsx';
|
||||
|
||||
const StudioOpenToAll = ({
|
||||
openToAllError, isFetching, isMutating, openToAll, handleUpdate
|
||||
|
@ -23,7 +24,9 @@ const StudioOpenToAll = ({
|
|||
<ToggleSlider
|
||||
disabled={isMutating}
|
||||
checked={openToAll}
|
||||
className="open-to-all-input"
|
||||
className={classNames('open-to-all-input', {
|
||||
'mod-mutating': isMutating
|
||||
})}
|
||||
onChange={e => handleUpdate(e.target.checked)}
|
||||
/>
|
||||
{openToAllError && <div>Error mutating openToAll: {openToAllError}</div>}
|
||||
|
|
Loading…
Reference in a new issue