Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use wp.blockEditor.ColorPaletteControl instead of our own Component #671

Closed
bfintal opened this issue Mar 18, 2020 · 1 comment
Closed
Labels
enhancement New feature or request medium priority This issue may be considered after the upcoming release.

Comments

@bfintal
Copy link
Contributor

bfintal commented Mar 18, 2020

We implemented our own ColorPaletteControl since the one in Gutenberg wasn't exposed in the API. Now that WordPress/gutenberg#13018 is resolved, we can now do:

import { ColorPalleteControl } from '@wordpress/block-editor'

This only works in WP 5.4+, so we'll need to do backward compatibility for lower versions.

@bfintal bfintal added enhancement New feature or request medium priority This issue may be considered after the upcoming release. labels Mar 18, 2020
@ruock
Copy link

ruock commented Apr 16, 2020

Hi @bfintal , thank you for your message.
I'm trying to use ColorPaletteControl with the last Wordpress' version, but nothing is printed.

What am I doing wrong?

const {ColorPaletteControl} = wp.blockEditor;

<ColorPaletteControl
         label={label}
         colors={colors}
         value={value}
/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium priority This issue may be considered after the upcoming release.
Projects
None yet
Development

No branches or pull requests

3 participants