File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/components/color-palette-control Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 44
55import { AdvancedToolbarControl } from '..'
66import { i18n } from 'stackable'
7+ import { extractColor } from '~stackable/util'
78
89/**
910 * WordPress dependencies
@@ -39,6 +40,8 @@ export const ColorPalettePopup = memo( props => {
3940 isGradient,
4041 } = props
4142
43+ const extractedValue = extractColor ( value )
44+
4245 const [ tab , setTab ] = useState ( value . startsWith ( 'linear-' ) || value . startsWith ( 'radial-' ) ? 'gradient' : '' )
4346 const allColors = colors . reduce ( ( colors , group ) => {
4447 return [
@@ -87,7 +90,7 @@ export const ColorPalettePopup = memo( props => {
8790 onChange = { newValue => {
8891 onChange ( preOnChange ( newValue , value ) )
8992 } }
90- color = { value }
93+ color = { extractedValue }
9194 enableAlpha = { true }
9295 />
9396 }
You can’t perform that action at this time.
0 commit comments