JSPM

  • Created
  • Published
  • Downloads 9973
  • Score
    100M100P100Q130093F
  • 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

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.