Skip to content

Commit

Permalink
Set initialOpen for color palettes to false for Paragraph block
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Jul 17, 2018
1 parent 4d8c4a6 commit ad1a113
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions core-blocks/paragraph/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ class ParagraphBlock extends Component {
</PanelBody>
<PanelColorSettings
title={ __( 'Color Settings' ) }
initialOpen={ false }
colorSettings={ [
{
value: backgroundColor.value,
Expand Down
8 changes: 7 additions & 1 deletion editor/components/panel-color-settings/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* External dependencies
*/
import { omit } from 'lodash';

/**
* WordPress dependencies
*/
Expand All @@ -14,7 +19,7 @@ import ColorPaletteControl from '../color-palette/control';
import TextWithColorIndicators from '../text-with-color-indicators';
import withColorContext from '../color-palette/with-color-context';

export function PanelColorSettings( { title, colorSettings, children } ) {
export function PanelColorSettings( { title, colorSettings, children, ...props } ) {
const className = 'editor-panel-color-settings';

const titleElement = (
Expand All @@ -30,6 +35,7 @@ export function PanelColorSettings( { title, colorSettings, children } ) {
<PanelBody
className={ className }
title={ titleElement }
{ ...omit( props, 'colors' ) }
>
{ colorSettings.map( ( settings, index ) => (
<ColorPaletteControl key={ index } { ...settings } />
Expand Down

0 comments on commit ad1a113

Please sign in to comment.