Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/315-colors
Browse files Browse the repository at this point in the history
  • Loading branch information
PatelUtkarsh committed Jul 12, 2022
2 parents a7bd53e + 8d089a3 commit 1805f5e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ const ColorControl = ( { defaultValue, params, onColorChange, mode } ) => {
};

useEffect( () => {
if ( ! color ) {
return;
}

let hexColor = color.substring( 1 );

if ( hexColor.length === 3 ) {
Expand Down Expand Up @@ -179,7 +183,7 @@ const ColorControl = ( { defaultValue, params, onColorChange, mode } ) => {
<MaterialColorPalette
value={ color }
onChange={ value => {
onChange( value );
onChange( value ?? defaultValue );
} }
materialColorsOnly={ true }
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
width: 40px;
}

.material-design-color__input input {
width: 50% !important; /* Override core */
.material-design-color__input {
width: 82px;
}

.material-design-color__shuffle.material-design-color__shuffle {
margin-left: 15px;
}

0 comments on commit 1805f5e

Please sign in to comment.