You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/swatchgroup/stories/swatchgroup.stories.js
+44-4Lines changed: 44 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -23,9 +23,9 @@ import {
23
23
*
24
24
* ### Border only for low-contrast swatches
25
25
*
26
-
* Swatches within a swatch group with low contrast (below 3:1 contrast with the background) have a less prominent border compared to the swatch component when used by itself, and should have the `.spectrum-Swatch--lightBorder` class. Low contrast color swatches have a border of gray-900 at 20%. This reduces the likelihood of the UI interfering with color perception and comparisons.
26
+
* Swatches within a swatch group with low contrast (below 3:1 contrast with the background) have a less prominent border compared to the swatch component when used by itself, and should have the `.spectrum-Swatch--lightBorder` class. Low contrast color swatches have a border of `gray-900` at 20%. This reduces the likelihood of the UI interfering with color perception and comparisons.
27
27
*
28
-
* Swatches should have the `.spectrum-Swatch--noBorder` class, otherwise.
28
+
* Swatches within a swatch group should have the `.spectrum-Swatch--noBorder` class, otherwise.
29
29
*
30
30
* ### Density
31
31
*
@@ -49,7 +49,6 @@ export default {
49
49
isSelected,
50
50
swatchColor: {table: {disable: true}},
51
51
isRectangle: {table: {disable: true}},
52
-
withBorder: {table: {disable: true}},
53
52
isGradient: {table: {disable: true}},
54
53
isImage: {table: {disable: true}},
55
54
isMixedValue: {table: {disable: true}},
@@ -62,6 +61,17 @@ export default {
62
61
name: "Container width",
63
62
table: {disable: true},
64
63
},
64
+
withBorder: {
65
+
name: "Border",
66
+
description: "Use the `lightBorder` class when grouped swatches have a color contrast ratio of less than 3:1.",
* Swatches within a swatch group with low contrast (below 3:1 contrast with the background) have a less prominent border compared to the swatch component when used by itself.
156
+
* Low contrast color swatches have a border of `gray-900` at 20%. This reduces the likelihood of the UI interfering with color perception and comparisons.
157
+
* In this example, the lower contrast swatches utilize the `.spectrum-Swatch--lightBorder` class.
0 commit comments