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 { __ } from '@wordpress/i18n';
|
||||||
import { useSelect } from '@wordpress/data';
|
import { useSelect } from '@wordpress/data';
|
||||||
import {
|
|
||||||
// @ts-expect-error No types for this exist yet.
|
/**
|
||||||
privateApis as blockEditorPrivateApis,
|
* WordPress private dependencies
|
||||||
} from '@wordpress/block-editor';
|
*/
|
||||||
|
import { StylesColorPanel } from '../../../private-apis';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal dependencies
|
||||||
|
*/
|
||||||
import ScreenHeader from './screen-header';
|
import ScreenHeader from './screen-header';
|
||||||
import { unlock } from '../../../lock-unlock';
|
|
||||||
import { useEmailStyles } from '../../../hooks';
|
import { useEmailStyles } from '../../../hooks';
|
||||||
import { storeName } from '../../../store';
|
import { storeName } from '../../../store';
|
||||||
|
|
||||||
export function ScreenColors(): JSX.Element {
|
export function ScreenColors(): JSX.Element {
|
||||||
const { ColorPanel: StylesColorPanel } = unlock( blockEditorPrivateApis );
|
|
||||||
const { styles, defaultStyles, updateStyles } = useEmailStyles();
|
const { styles, defaultStyles, updateStyles } = useEmailStyles();
|
||||||
const theme = useSelect( ( select ) => select( storeName ).getTheme(), [] );
|
const theme = useSelect( ( select ) => select( storeName ).getTheme(), [] );
|
||||||
|
|
||||||
|
@ -50,9 +50,15 @@ const unlockGetEnabledClientIdsTree = ( selectHook ) => {
|
|||||||
return getEnabledClientIdsTree;
|
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 {
|
export {
|
||||||
BlockCanvas,
|
BlockCanvas,
|
||||||
Tabs,
|
Tabs,
|
||||||
|
StylesColorPanel,
|
||||||
unlockPatternsRelatedSelectorsFromCoreStore,
|
unlockPatternsRelatedSelectorsFromCoreStore,
|
||||||
unlockGetEnabledClientIdsTree,
|
unlockGetEnabledClientIdsTree,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user