Skip to content

Commit

Permalink
Fix inline example to use private API
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Aug 2, 2023
1 parent 9b340ba commit d29c2cd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/components/src/theme/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ import { useCx } from '../utils';
*
* @example
* ```jsx
* import { __experimentalTheme as Theme } from '@wordpress/components';
* import { privateApis as componentsPrivateApis } from '@wordpress/components';
* import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';
*
* const { lock, unlock } = __dangerousOptInToUnstableAPIsOnlyForCoreModules(
* 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',
* '@wordpress/components'
* );
*
* const { Theme } = unlock( componentsPrivateApis );
*
* const Example = () => {
* return (
Expand Down

0 comments on commit d29c2cd

Please sign in to comment.