Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Pass color value rather than slug as prop, to fix preset color preview
  • Loading branch information
stacimc committed Sep 1, 2021
commit 9addeb9d768723111acbffc92be99c8698495ea5
6 changes: 5 additions & 1 deletion packages/block-editor/src/hooks/border-color.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ export function BorderColorEdit( props ) {
const disableCustomColors = ! useSetting( 'color.custom' );
const disableCustomGradients = ! useSetting( 'color.customGradient' );
const [ colorValue, setColorValue ] = useState(
borderColor || style?.border?.color
getColorObjectByAttributeValues(
colors,
borderColor,
style?.border?.color
)?.color
);

const onChangeColor = ( value ) => {
Expand Down