diff options
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 }); } |