diff --git a/website/src/Auth/Login.js b/website/src/Auth/Login.js index c0abdd8..0ccee89 100644 --- a/website/src/Auth/Login.js +++ b/website/src/Auth/Login.js @@ -39,7 +39,7 @@ export class Login extends React.Component { reactAutoBind(this) this.state = { waitModal: false, - messageModal: { icon: 'hold', message: 'Wait there just a second', detail: 'This is just a test' }, + messageModal: null, binder: new FormBinder({}, Login.bindings) } } diff --git a/website/src/ui/Checkbox.js b/website/src/ui/Checkbox.js index 923a68e..cad79e1 100644 --- a/website/src/ui/Checkbox.js +++ b/website/src/ui/Checkbox.js @@ -10,7 +10,7 @@ class Checkbox extends Component { value: PropTypes.bool, label: PropTypes.string, visible: PropTypes.bool, - // disabled: PropTypes.bool, + disabled: PropTypes.bool, name: PropTypes.string, } @@ -27,27 +27,26 @@ class Checkbox extends Component { } render() { - const { visible, name, label } = this.props + const { visible, name, label, disabled } = this.props + const { checked } = this.state return (
-
-
+
+ +
- { /* TODO: Move this into .style.js */ } - { /* TODO: Implement disabled */ } - { /* TODO: Add checkbox input element back in */ } - { /* TODO: Use an actual label element with a for (shortid) */ } - + color: disabled ? fontInfo.color.dimmed : fontInfo.color.normal, + }]}> {label} - +
) } diff --git a/website/src/ui/Checkbox.style.js b/website/src/ui/Checkbox.style.js index 8b1ca4e..8822e0b 100644 --- a/website/src/ui/Checkbox.style.js +++ b/website/src/ui/Checkbox.style.js @@ -1,22 +1,35 @@ -import { colorInfo } from './style' +import { colorInfo, sizeInfo } from './style' export default { checkbox: { + position: 'relative', display: 'inline-block', cursor: 'pointer', - position: 'relative', backgroundColor: colorInfo.buttonBackground, - height: 25, - width: 25, + height: sizeInfo.checkboxSize, + width: sizeInfo.checkboxSize, + ':hover': { + backgroundColor: colorInfo.buttonBackgroundHover + } + }, + + input: { + position: 'absolute', + opacity: 0, + cursor: 'pointer', }, checkboxUnchecked: { - backgroundColor: '#E0E0E0', + backgroundColor: colorInfo.uncheckedCheckbox, ':hover': { - backgroundColor: '#C0C0C0' + backgroundColor: colorInfo.uncheckedCheckboxHover, } }, + checkboxDisabled: { + backgroundColor: colorInfo.disabledButtonBackground, + }, + checkmark: { position: 'absolute', content: '', @@ -27,10 +40,14 @@ export default { borderStyle: 'solid', borderColor: '#FFFFFF', borderWidth: '0 3px 3px 0', - transform: 'rotate(45deg)' + transform: 'rotate(45deg)', }, checkmarkUnchecked: { display: 'none' }, + + label: { + marginLeft: 10, + } } diff --git a/website/src/ui/Text.js b/website/src/ui/Text.js index fc380d2..d426b20 100644 --- a/website/src/ui/Text.js +++ b/website/src/ui/Text.js @@ -21,7 +21,7 @@ class Text extends Component { } render() { - const { margin, width, align } = this.props + const { margin, width, align, children } = this.props return ( {this.props.children} + }}>{children} ) } } diff --git a/website/src/ui/style.js b/website/src/ui/style.js index 41a1aea..2a6fd1f 100644 --- a/website/src/ui/style.js +++ b/website/src/ui/style.js @@ -6,8 +6,10 @@ export const colorInfo = { buttonBackgroundHover: '#3CB0FD', headerButtonBackground: '#FAFAFA', headerButtonBackgroundHover: '#DADADA', - disabledButtonBackground: '#A0A0A0', + disabledButtonBackground: '#E0E0E0', modalBackground: '#FFFFFF', + uncheckedCheckbox: '#A0A0A0', + uncheckedCheckboxHover: '#808080', } export const sizeInfo = { @@ -17,6 +19,7 @@ export const sizeInfo = { headerBorderWidth: 1, buttonHeight: 40, minButtonWidth: 100, + checkboxSize: 25, } export const fontInfo = {