Skip to content

Commit

Permalink
Updated ColorIndicator readme (#37638)
Browse files Browse the repository at this point in the history
* Update README.md

added more info to the component as well images

* added more info to the component as well images
  • Loading branch information
evrpress committed Jan 5, 2022
1 parent 81397c7 commit e6dae2b
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/components/src/color-indicator/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,37 @@
# ColorIndicator

ColorIndicator is a React component that renders a specific color in a squared box. It's often used to summarize a collection of used colors in a child component.

### Single component

![simple color indicator](https://user-images.githubusercontent.com/881729/147558034-cba09db5-2f06-458b-a7b1-fd2f2ffb982a.png)

### Used in sidebar

![multiple color indicator](https://user-images.githubusercontent.com/881729/147559177-69ce52e1-30dc-4f24-8483-ca2a580f434f.png)

## Usage

```jsx
import { ColorIndicator } from '@wordpress/components';

const MyColorIndicator = () => <ColorIndicator colorValue="#0073aa" />;
```

## Props

The component accepts the following props:

### colorValue

The color of the indicator. Any value from the [`background`](https://developer.mozilla.org/en-US/docs/Web/CSS/background) property is supported.

- Type: `string`
- Required: Yes

### className

Extra classes for the used `<span>` element. By default only `component-color-indicator` is added.

- Type: `string`
- Required: No

0 comments on commit e6dae2b

Please sign in to comment.