JSPM

  • Created
  • Published
  • Downloads 9973
  • Score
    100M100P100Q130092F
  • License GPL-2.0-or-later

Global Styles UI components for WordPress.

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 --save

Usage

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 styles
  • baseValue (GlobalStylesConfig): Theme's default global styles
  • onChange (Function): Callback when styles change
  • path (string, optional): Current navigation path
  • onPathChange (Function, optional): Callback when path changes
  • fontLibraryEnabled (boolean, optional): Enable font library features
  • serverCSS (array, optional): Server CSS styles
  • serverSettings (object, optional): Server settings

Contributing

See CONTRIBUTING.md for details.