diff options
author | Determinant <ted.sybil@gmail.com> | 2019-02-19 01:03:09 -0500 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2019-02-19 01:03:09 -0500 |
commit | a6b9dadfe68921e6c7795518441109e77963ecd9 (patch) | |
tree | c368572137ea7d092fcc1a623609e4faa23ad20c /src/PatternTable.tsx | |
parent | 63fe414b6bf556fcc69e7065cfe96a642e54cf7f (diff) |
support new tab page; fix bugs
Diffstat (limited to 'src/PatternTable.tsx')
-rw-r--r-- | src/PatternTable.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/PatternTable.tsx b/src/PatternTable.tsx index 3aef72f..b9d0e9e 100644 --- a/src/PatternTable.tsx +++ b/src/PatternTable.tsx @@ -60,12 +60,12 @@ type NameFieldProps = { }; function NameField(props: NameFieldProps) { - let color = props.value.color; + let color = props.value.color.background; return ( <span> <div className={props.classes.colorSample} - style={{backgroundColor: color ? color.background : defaultChartColor}} + style={{backgroundColor: (color ? color : defaultChartColor)}} onClick={props.colorOnClick}> </div> <TextField @@ -117,7 +117,7 @@ class PatternTable extends React.Component<PatternTableProps> { handleColorPickerClose = () => { this.setState({ colorPickerOpen: false }); - this.activeColorPattern !== null && this.chosenColor !== null && + this.activeColorPattern !== null && this.chosenColor && this.props.onUpdatePattern('color', this.activeColorPattern, { background: this.chosenColor }); } |