Skip to content

Commit

Permalink
Use Colors: Mark hook as experimental.
Browse files Browse the repository at this point in the history
  • Loading branch information
epiqueras committed Jul 29, 2019
1 parent 3bc99f0 commit 40e399e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
4 changes: 0 additions & 4 deletions packages/block-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,6 @@ _Related_

Undocumented declaration.

<a name="useColors" href="#useColors">#</a> **useColors**

Undocumented declaration.

<a name="Warning" href="#Warning">#</a> **Warning**

Undocumented declaration.
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/colors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ export {
createCustomColorsHOC,
default as withColors,
} from './with-colors';
export { default as useColors } from './use-colors';
export { default as __experimentalUseColors } from './use-colors';
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/colors/use-colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const InspectorControlsColorPanel = ( props ) => (
</InspectorControls>
);

export default function useColors(
export default function __experimentalUseColors(
colorConfigs,
{ panelTitle = __( 'Color Settings' ), contrastCheckerProps, panelChildren } = {
panelTitle: __( 'Color Settings' ),
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/heading/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
BlockControls,
InspectorControls,
RichText,
useColors,
__experimentalUseColors,
} from '@wordpress/block-editor';

function HeadingEdit( {
Expand All @@ -29,7 +29,7 @@ function HeadingEdit( {
onReplace,
className,
} ) {
const { TextColor, InspectorControlsColorPanel } = useColors(
const { TextColor, InspectorControlsColorPanel } = __experimentalUseColors(
[ { name: 'textColor', attribute: 'color' } ],
{
contrastCheckerProps: { backgroundColor: 'white', isLargeText: true },
Expand Down

0 comments on commit 40e399e

Please sign in to comment.