-
{this.props.label}
+
+ {label}
-
+ placeholder={placeholder} />
- {this.props.message}
+ {valid ? ' ' : message}
)
}
diff --git a/website/src/ui/Button.js b/website/src/ui/Button.js
index f24b26e..87d1f97 100644
--- a/website/src/ui/Button.js
+++ b/website/src/ui/Button.js
@@ -7,13 +7,20 @@ class Button extends Component {
static propTypes = {
submit: PropTypes.bool,
children: PropTypes.node,
- width: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ])
+ width: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),
+ visible: PropTypes.bool,
+ disabled: PropTypes.bool,
+ name: PropTypes.name,
}
render() {
- const { children, submit, width } = this.props
+ const { name, children, submit, width, visible, disabled } = this.props
+
return (
-
+
)
}
}
diff --git a/website/src/ui/Button.style.js b/website/src/ui/Button.style.js
index f247567..9298d40 100644
--- a/website/src/ui/Button.style.js
+++ b/website/src/ui/Button.style.js
@@ -2,17 +2,20 @@ import { colorInfo, fontInfo } from './style'
export default {
base: {
+ height: '100%',
borderRadius: '10px',
fontFamily: fontInfo.family,
color: '#FFFFFF',
- fontSize: fontInfo.size['large'],
+ fontSize: fontInfo.size.large,
background: colorInfo.buttonBackgroundHover,
verticalAlign: 'middle',
- padding: '8px 15px 8px 15px',
+ padding: '0 15px 0 15px',
outline: 'none',
-
':hover': {
background: colorInfo.buttonBackground,
+ },
+ ':disabled': {
+ background: colorInfo.disabledButtonBackground,
}
}
}
diff --git a/website/src/ui/Checkbox.js b/website/src/ui/Checkbox.js
index 1d3d72b..347f400 100644
--- a/website/src/ui/Checkbox.js
+++ b/website/src/ui/Checkbox.js
@@ -9,6 +9,9 @@ class Checkbox extends Component {
static propTypes = {
value: PropTypes.bool,
label: PropTypes.string,
+ visible: PropTypes.bool,
+ // disabled: PropTypes.bool,
+ name: PropTypes.name,
}
constructor(props) {
@@ -24,18 +27,27 @@ class Checkbox extends Component {
}
render() {
+ const { visible, name, label } = this.props
+
return (
-
+
-
{this.props.label}
+ { /* 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) */ }
+
+ {label}
+
)
}
diff --git a/website/src/ui/Dropdown.js b/website/src/ui/Dropdown.js
deleted file mode 100644
index aa8c293..0000000
--- a/website/src/ui/Dropdown.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import Radium from 'radium'
-import PropTypes from 'prop-types'
-import React, { Component } from 'react'
-import style from './Input.style'
-
-class Dropdown extends Component {
- static propTypes = {
- password: PropTypes.bool,
- children: PropTypes.node
- }
-
- render() {
- return (
-
{this.props.children}
- )
- }
-}
-
-export default Radium(Dropdown)
diff --git a/website/src/ui/Dropdown.style.js b/website/src/ui/Dropdown.style.js
deleted file mode 100644
index efba7fa..0000000
--- a/website/src/ui/Dropdown.style.js
+++ /dev/null
@@ -1,2 +0,0 @@
-export default {
-}
diff --git a/website/src/ui/Input.js b/website/src/ui/Input.js
index c11232f..ca662f6 100644
--- a/website/src/ui/Input.js
+++ b/website/src/ui/Input.js
@@ -6,17 +6,22 @@ import style from './Input.style'
class Input extends Component {
static propTypes = {
password: PropTypes.bool,
- children: PropTypes.node,
- width: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ])
+ placeholder: PropTypes.string,
+ width: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),
+ onChange: PropTypes.func,
+ visible: PropTypes.bool,
+ disabled: PropTypes.bool,
+ name: PropTypes.string,
}
render() {
- let { children, width } = this.props
+ let { name, width, password, placeholder, onChange, visible, disabled } = this.props
width = width || '100%'
return (
-
{children}
+
)
}
}
diff --git a/website/src/ui/index.js b/website/src/ui/index.js
index c464e39..78e8545 100644
--- a/website/src/ui/index.js
+++ b/website/src/ui/index.js
@@ -8,7 +8,6 @@ export { default as Text } from './Text'
export { default as Link } from './Link'
export { default as Icon } from './Icon'
export { default as List } from './List'
-export { default as Dropdown } from './Dropdown'
export { default as Modal } from './Modal'
export { default as Dimmer } from './Dimmer'
export { default as Loader } from './Loader'
diff --git a/website/src/ui/style.js b/website/src/ui/style.js
index f0f993a..13e5280 100644
--- a/website/src/ui/style.js
+++ b/website/src/ui/style.js
@@ -6,6 +6,7 @@ export const colorInfo = {
buttonBackgroundHover: '#3CB0FD',
headerButtonBackground: '#FAFAFA',
headerButtonBackgroundHover: '#DADADA',
+ disabledButtonBackground: '#A0A0A0',
}
export const sizeInfo = {