💦 FULL SET: Changeset/ - Collection

Changeset 2180208


Ignore:
Timestamp:
10/25/2019 04:02:22 PM (6 years ago)
Author:
iseulde
Message:

v0.0.18

Location:
slide/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • slide/trunk/index.js

    r2179945 r2180208  
    2020  const { useSelect, useDispatch, subscribe, select, dispatch } = data;
    2121  const { TextareaControl, ColorPicker, PanelBody, RangeControl, SelectControl, ToggleControl, Button, FocalPointPicker, ExternalLink, Notice, TextControl, RadioControl } = components;
    22   const { MediaUpload, __experimentalGradientPickerControl, InnerBlocks, InspectorControls, RichTextToolbarButton } = blockEditor;
     22  const { MediaUpload, __experimentalGradientPickerControl, InnerBlocks, InspectorControls, RichTextToolbarButton, ColorPalette } = blockEditor;
    2323  const { addQueryArgs } = url;
    2424  const colorKey = 'presentation-color';
     
    4444  const horizontalPaddingKey = 'presentation-horizontal-padding';
    4545  const verticalPaddingKey = 'presentation-vertical-padding';
     46  const colorPaletteKey = 'presentation-color-palette';
    4647
    4748  const CodeEditor = memo(({ onChange, ...props }) => {
     
    412413              });
    413414            }
     415          })
     416        ),
     417        e(
     418          PluginDocumentSettingPanel,
     419          {
     420            name: 'slide-palette',
     421            title: __('Color Palette', 'slide'),
     422            icon: 'art'
     423          },
     424          e(TextareaControl, {
     425            label: __('Comma separated list of color values. Please refresh the page to be able to use the palette.', 'slide'),
     426            value: meta[colorPaletteKey],
     427            onChange: (value) => updateMeta(value, colorPaletteKey)
    414428          })
    415429        ),
     
    583597              initialOpen: false
    584598            },
    585             e(ColorPicker, {
    586               disableAlpha: true,
     599            e(ColorPalette, {
    587600              label: __('Color', 'slide'),
    588               color: attributes.color,
    589               onChangeComplete: ({ hex: color }) =>
     601              value: attributes.color,
     602              onChange: (color) =>
    590603                setAttributes({ color })
    591604            }),
     
    606619              initialOpen: false
    607620            },
    608             e(ColorPicker, {
    609               disableAlpha: true,
     621            e(ColorPalette, {
    610622              label: __('Background Color', 'slide'),
    611               color: attributes.backgroundColor,
    612               onChangeComplete: ({ hex: backgroundColor }) =>
     623              value: attributes.backgroundColor,
     624              onChange: (backgroundColor) =>
    613625                setAttributes({ backgroundColor })