diff --git a/browser/components/ColorPicker.js b/browser/components/ColorPicker.js index f68aa8ec..9e0199c2 100644 --- a/browser/components/ColorPicker.js +++ b/browser/components/ColorPicker.js @@ -4,20 +4,24 @@ import { SketchPicker } from 'react-color' import CSSModules from 'browser/lib/CSSModules' import styles from './ColorPicker.styl' -const componentHeight = 333 +const componentHeight = 330 class ColorPicker extends React.Component { constructor (props) { super(props) this.state = { - color: this.props.color || '#888888' + color: this.props.color || '#939395' } this.onColorChange = this.onColorChange.bind(this) this.handleConfirm = this.handleConfirm.bind(this) } + componentWillReceiveProps (nextProps) { + this.onColorChange(nextProps.color) + } + onColorChange (color) { this.setState({ color @@ -41,6 +45,7 @@ class ColorPicker extends React.Component { return (
+
diff --git a/browser/components/ColorPicker.styl b/browser/components/ColorPicker.styl index 927a0da2..6e4aceb8 100644 --- a/browser/components/ColorPicker.styl +++ b/browser/components/ColorPicker.styl @@ -1,25 +1,37 @@ .colorPicker position fixed - z-index 10000 + z-index 2 display flex flex-direction column + +.cover + position fixed + top 0 + right 0 + bottom 0 + left 0 + .footer display flex justify-content center + z-index 2 align-items center - padding 5px & > button + button margin-left 10px .btn-cancel, .btn-confirm, .btn-reset - height 1.6em - border 1px solid #888888 - background-color #fff - font-size 15px + vertical-align middle + height 25px + margin-top 2.5px + colorDefaultButton() border-radius 2px + border $ui-border + padding 0 5px .btn-confirm background-color #1EC38B + &:hover + background-color darken(#1EC38B, 25%) diff --git a/browser/components/TagListItem.js b/browser/components/TagListItem.js index 64a74d63..9aa00a1d 100644 --- a/browser/components/TagListItem.js +++ b/browser/components/TagListItem.js @@ -10,8 +10,8 @@ import CSSModules from 'browser/lib/CSSModules' * @param {string} name * @param {Function} handleClickTagListItem * @param {Function} handleClickNarrowToTag -* @param {bool} isActive -* @param {bool} isRelated +* @param {boolean} isActive +* @param {boolean} isRelated * @param {string} bgColor tab backgroundColor */ @@ -24,7 +24,8 @@ const TagListItem = ({name, handleClickTagListItem, handleClickNarrowToTag, hand :
}