GitLab will be upgraded on June 23rd evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit 8a280193 authored by Marjolaine Bodin's avatar Marjolaine Bodin

#497 use switch component

parent fb2a2c4c
Pipeline #46646 passed with stage
in 3 minutes and 5 seconds
This diff is collapsed.
......@@ -16,6 +16,7 @@ import {
setCategoryTypes,
unsetCategoryTypes,
} from '../../../actions/logbook';
import Switch from 'react-switch';
const commandLineValue = [
{ type: NOTIFICATION, category: EVENT_CATEGORY_COMMANDLINE },
......@@ -88,7 +89,7 @@ export default function SettingLogbookMenuPanel(props) {
</Panel.Heading>
<Panel.Body>
<Grid fluid>
<Col md={2} sm={6} xs={6}>
<Col md={2} sm={4} xs={6}>
<h4>Log types</h4>
<Grid>
<Row>
......@@ -121,20 +122,18 @@ export default function SettingLogbookMenuPanel(props) {
</Grid>
</Col>
{isCommandLineDisplayed() && (
<Row>
<Col>
<Checkbox
checked={automaticCollapsing}
className={styles.returnCheckbox}
name="isAutomaticCollapsing"
onChange={(e) => {
dispatch(setAutomaticCollapsing(e.target.checked));
}}
>
Automatic collapsing of grouped logs
</Checkbox>
</Col>
</Row>
<Col md={4} sm={8} xs={12}>
<Switch
onColor="#428bca"
onChange={() => {
dispatch(setAutomaticCollapsing(!automaticCollapsing));
}}
checked={automaticCollapsing}
/>
<span className={styles.toggleText}>
Automatic collapsing of grouped logs
</span>
</Col>
)}
</Grid>
</Panel.Body>
......
.returnCheckbox {
margin-bottom: 12px !important;
}
.toggleText {
margin-bottom: 12px;
margin-left: 12px;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment