Package Exports
- @wordpress/global-styles-ui
- @wordpress/global-styles-ui/build-style/style-rtl.css
- @wordpress/global-styles-ui/build-style/style.css
- @wordpress/global-styles-ui/package.json
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@wordpress/global-styles-ui) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Global Styles UI
UI components for managing WordPress Global Styles.
Installation
Install the module:
npm install @wordpress/global-styles-ui --saveUsage
import { GlobalStylesUI } from '@wordpress/global-styles-ui';
function MyComponent() {
return (
<GlobalStylesUI
value={ userStyles }
baseValue={ themeStyles }
onChange={ handleChange }
/>
);
}API
GlobalStylesUI
Main component for the Global Styles editor interface.
Props:
value(GlobalStylesConfig): User's custom global stylesbaseValue(GlobalStylesConfig): Theme's default global stylesonChange(Function): Callback when styles changepath(string, optional): Current navigation pathonPathChange(Function, optional): Callback when path changesfontLibraryEnabled(boolean, optional): Enable font library featuresserverCSS(array, optional): Server CSS stylesserverSettings(object, optional): Server settings
Contributing
See CONTRIBUTING.md for details.