Skip to content

Commit 9731548

Browse files
committed
added a persist button to front end
1 parent 9e7fd63 commit 9731548

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/app/containers/ButtonsContainer.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
33

4-
const ButtonsContainer = ({ mode: { paused, locked }, toggleMode }) => (
4+
const ButtonsContainer = ({ mode: { paused, locked, persist }, toggleMode }) => (
55
<div className="buttons-container">
66
<div className="pause-button" onClick={() => toggleMode('paused')}>{(paused) ? 'Resume' : 'Pause'}</div>
77
<div className="lock-button" onClick={() => toggleMode('locked')}>{(locked) ? 'Unlock' : 'Lock'}</div>
8+
<div className="persist-button" onClick={() => toggleMode('persist')}>{(persist) ? 'Unpersist' : 'Persist'}</div>
89
</div>
910
);
1011

@@ -13,6 +14,7 @@ ButtonsContainer.propTypes = {
1314
mode: PropTypes.shape({
1415
paused: PropTypes.bool,
1516
locked: PropTypes.bool,
17+
persist: PropTypes.bool,
1618
}).isRequired,
1719
};
1820

src/app/styles/components/_buttons.scss

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,9 @@
4545
margin: 7px;
4646
}
4747

48-
.lock-button {
49-
@extend %button-shared;
50-
}
51-
52-
.pause-button {
48+
.lock-button,
49+
.pause-button,
50+
.persist-button {
5351
@extend %button-shared;
5452
}
5553

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.buttons-container {
22
margin: 0 1% 0 1%;
33
display: grid;
4-
grid-template-columns: 1fr 1fr;
4+
grid-template-columns: repeat(3, 1fr);
55
grid-gap: 1%;
66
padding: 1% 0 1% 0;
77
}

0 commit comments

Comments
 (0)