Components: Expose Theme via private APIs#53262
Conversation
|
Flaky tests detected in 9ff62c0. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5737134101
|
| * @example | ||
| * ```jsx | ||
| * import { __experimentalTheme as Theme } from '@wordpress/components'; | ||
| * import { privateApis as componentsPrivateApis } from '@wordpress/components'; |
There was a problem hiding this comment.
I don't think we should add the unlocking in the example. Maybe just mention it's private? Whatever we decide here, should also apply to the other private components too(not for this PR). --cc @mirka
We could also do that in a follow up.
There was a problem hiding this comment.
Thanks, agreed - I was a bit torn about whether to include it or not, so I've removed that part from the example in 87e9815
Happy to do follow-up updates if anyone has a further suggestion.
ntsekouras
left a comment
There was a problem hiding this comment.
Besides the comments about readme usage, the change is straight forward. I'll pre-approve. Thanks!
9ff62c0 to
87e9815
Compare
What?
This exposes the existing
Themecomponent via the@wordpress/componentprivate APIs.Why?
It's necessary for #53032, for usage outside of the
@wordpress/componentspackage.Any prior usages of that component were within the package, so it could be directly imported.
Usage of
Themewas suggested by @mirka here: #53030 (comment)How?
Themeto the list of@wordpress/componentsprivate APIs,__experimentalThemeexposition, which isn't the case),Testing Instructions
Themestill works well in storybook.Testing Instructions for Keyboard
None
Screenshots or screencast
None