Skip to content

Commit ade5769

Browse files
fix: styling options of menu icon
1 parent e3ed1c9 commit ade5769

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

assets/apps/components/src/Controls/ColorControl.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ const ColorControl = ({
5252
};
5353

5454
const isGlobal = selectedColor && selectedColor.indexOf('var') > -1;
55+
const defaultGradient = 'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)';
5556

5657
const handleClear = () => {
5758
onChange(defaultValue || '');
59+
setGradient(defaultValue || defaultGradient);
5860
toggle();
5961
};
6062

@@ -64,7 +66,7 @@ const ColorControl = ({
6466
{ 'allows-global': !disableGlobal },
6567
]);
6668

67-
const [gradient, setGradient] = useState(selectedColor);
69+
const [gradient, setGradient] = useState(selectedColor || defaultGradient);
6870
const isGradient = (value) => {
6971
return value && value.toLowerCase().indexOf('gradient') !== -1;
7072
};
@@ -157,7 +159,7 @@ const ColorControl = ({
157159
<div
158160
className="current-color-gradient"
159161
style={{
160-
background: selectedColor,
162+
background: selectedColor || defaultGradient,
161163
height: '177px',
162164
border: '1px solid #eee',
163165
minWidth: '215px',

0 commit comments

Comments
 (0)