mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 01:31:48 +08:00
Check for color knob value existence before applying uppercase
This commit is contained in:
parent
c6d704225e
commit
9f2706d290
@ -82,7 +82,6 @@ class ColorType extends React.Component {
|
||||
const colorStyle = {
|
||||
background: knob.value,
|
||||
};
|
||||
|
||||
return (
|
||||
<ColorButton
|
||||
active={displayColorPicker}
|
||||
@ -91,7 +90,7 @@ class ColorType extends React.Component {
|
||||
onClick={this.handleClick}
|
||||
size="flex"
|
||||
>
|
||||
{knob.value.toUpperCase()}
|
||||
{knob.value && knob.value.toUpperCase()}
|
||||
<Swatch style={colorStyle} />
|
||||
{displayColorPicker ? (
|
||||
<Popover
|
||||
|
Loading…
x
Reference in New Issue
Block a user