Skip to content

Commit 37bccbb

Browse files
committed
chore(swatch+swatchgroup): add hovered hover + keyboard focus controls for add swatch
1 parent 624d36d commit 37bccbb

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

components/swatch/dist/metadata.json

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
"--spectrum-swatch-icon-border-color",
9696
"--spectrum-swatch-icon-color",
9797
"--spectrum-swatch-inner-border-color-selected",
98+
"--spectrum-swatch-rectangle-width-multiplier",
9899
"--spectrum-swatch-size",
99100
"--spectrum-swatch-size-extra-small",
100101
"--spectrum-swatch-size-large",

components/swatch/index.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@
311311
}
312312

313313
.spectrum-Swatch--rectangle {
314-
inline-size: calc(var(--spectrum-swatch-size) * var(--spectrun-swatch-rectangle-width-multiplier));
314+
inline-size: calc(var(--spectrum-swatch-size) * var(--spectrum-swatch-rectangle-width-multiplier));
315315
}
316316

317317
/* Variant: Rounding - Full */

components/swatch/stories/swatch.test.js

+10
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ export const Swatches = (args, context) => {
3636
...args,
3737
isAddSwatch: true,
3838
}, context),
39+
Template({
40+
...args,
41+
isAddSwatch: true,
42+
isHover: true,
43+
}, context),
44+
Template({
45+
...args,
46+
isAddSwatch: true,
47+
isKeyboardFocus: true,
48+
}, context),
3949
Template({
4050
...args,
4151
swatchColor: undefined,

0 commit comments

Comments
 (0)