Skip to content

Commit 61b8fc3

Browse files
Merge pull request #28741 from aberllin/patch-1
Docs: Update ColorPallete and example
2 parents 84a2b96 + 65561ed commit 61b8fc3

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/api/doc-blocks/doc-block-colorpalette.mdx

+13-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ import { Meta, ColorPalette, ColorItem } from '@storybook/blocks';
4646
Apple30: 'rgba(102,191,60,.3)',
4747
}}
4848
/>
49+
<ColorItem
50+
title="gradient"
51+
subtitle="Grayscale"
52+
colors={{
53+
Gradient: 'linear-gradient(to right,white,black)',
54+
}}
55+
/>
56+
<ColorItem
57+
title="gradient"
58+
subtitle="Grayscale"
59+
colors={['linear-gradient(65deg,white,black)']}
60+
/>
4961
</ColorPalette>
5062
```
5163

@@ -79,7 +91,7 @@ import { ColorItem } from '@storybook/blocks';
7991

8092
Type: `string[] | { [key: string]: string }`
8193

82-
Provides the list of colors to be displayed. Accepts any valid CSS color format (hex, RGB, HSL, etc.). When an object is provided, the keys will be displayed above the values.
94+
Provides the list of colors to be displayed. Accepts any valid CSS color format (hex, RGB, HSL, etc.). When an object is provided, the keys will be displayed above the values. Additionally, it supports gradients such as 'linear-gradient(to right, white, black)' or 'linear-gradient(65deg, white, black)', etc.
8395

8496
### `subtitle`
8597

0 commit comments

Comments
 (0)