@wordpress/components
Version:
UI components for WordPress.
36 lines (19 loc) • 1.05 kB
Markdown
# ColorIndicator
ColorIndicator is a React component that renders a specific color in a circle. It's often used to summarize a collection of used colors in a child component.
### Single component

### Used in sidebar

## Usage
```jsx
import { ColorIndicator } from '@wordpress/components';
const MyColorIndicator = () => <ColorIndicator colorValue="#0073aa" />;
```
## Props
The component accepts the following props:
### `className`: `string`
Extra classes for the used `<span>` element. By default only `component-color-indicator` is added.
- Required: No
### `colorValue`: `CSSProperties[ 'background' ]`
The color of the indicator. Any value from the CSS [`background`](https://developer.mozilla.org/en-US/docs/Web/CSS/background) property is supported.
- Required: Yes