diff --git a/components/Settings.js b/components/Settings.js index dee6519..6d0ebab 100644 --- a/components/Settings.js +++ b/components/Settings.js @@ -1,6 +1,10 @@ import React from 'react' import enhanceWithClickOutside from 'react-click-outside' import SettingsIcon from './svg/Settings' +import ThemeSelect from './ThemeSelect' +import Slider from './Slider' +import Toggle from './Toggle' +import { PALETTE } from '../lib/constants' class Settings extends React.Component { constructor(props) { @@ -26,23 +30,11 @@ class Settings extends React.Component {
-
- Theme -
-
-
-
-
-
-
- Drop shadow -
-
- Window controls -
-
- Padding (horizontal) -
+ + + + +
diff --git a/components/Toggle.js b/components/Toggle.js new file mode 100644 index 0000000..1768e92 --- /dev/null +++ b/components/Toggle.js @@ -0,0 +1,34 @@ +import React from 'react' +import Checkmark from './svg/Checkmark' + +export default class extends React.Component { + constructor(props) { + super() + this.state = { isEnabled: props.enabled || false } + this.toggle = this.toggle.bind(this) + } + + toggle() { + this.setState({ isEnabled: !this.state.isEnabled }) + } + + render() { + return ( +
+ {this.props.label} + { this.state.isEnabled ? : null } + +
+ ) + } +} diff --git a/components/Toolbar.js b/components/Toolbar.js index dc4dfd0..dae638b 100644 --- a/components/Toolbar.js +++ b/components/Toolbar.js @@ -13,7 +13,7 @@ const Toolbar = (props) => ( onChange={props.onBGChange} bg={props.bg} /> - +