Export StylesColorPanel from private-apis file
[MAILPOET-6319]
This commit is contained in:
committed by
Oluwaseun Olorunsola
parent
ceecfe69a5
commit
b631e509ef
@ -1,16 +1,22 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import {
|
||||
// @ts-expect-error No types for this exist yet.
|
||||
privateApis as blockEditorPrivateApis,
|
||||
} from '@wordpress/block-editor';
|
||||
|
||||
/**
|
||||
* WordPress private dependencies
|
||||
*/
|
||||
import { StylesColorPanel } from '../../../private-apis';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import ScreenHeader from './screen-header';
|
||||
import { unlock } from '../../../lock-unlock';
|
||||
import { useEmailStyles } from '../../../hooks';
|
||||
import { storeName } from '../../../store';
|
||||
|
||||
export function ScreenColors(): JSX.Element {
|
||||
const { ColorPanel: StylesColorPanel } = unlock( blockEditorPrivateApis );
|
||||
const { styles, defaultStyles, updateStyles } = useEmailStyles();
|
||||
const theme = useSelect( ( select ) => select( storeName ).getTheme(), [] );
|
||||
|
||||
|
@ -50,9 +50,15 @@ const unlockGetEnabledClientIdsTree = ( selectHook ) => {
|
||||
return getEnabledClientIdsTree;
|
||||
};
|
||||
|
||||
/**
|
||||
* We use the ColorPanel component from the block editor to render the color panel in the style settings sidebar.
|
||||
*/
|
||||
const { ColorPanel: StylesColorPanel } = unlock( blockEditorPrivateApis );
|
||||
|
||||
export {
|
||||
BlockCanvas,
|
||||
Tabs,
|
||||
StylesColorPanel,
|
||||
unlockPatternsRelatedSelectorsFromCoreStore,
|
||||
unlockGetEnabledClientIdsTree,
|
||||
};
|
||||
|
Reference in New Issue
Block a user