Skip to content

Commit 3acd94e

Browse files
committed
docs: ✏️ adjusted story
1 parent 8cb0566 commit 3acd94e

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

src/stories/examples/initial-transform/example.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,19 @@ function StateBadge() {
107107
));
108108
}
109109

110+
function getChipBackground(active: boolean, lit: boolean): string {
111+
if (active)
112+
return "linear-gradient(135deg, rgba(99,102,241,0.22), rgba(129,140,248,0.10))";
113+
if (lit) return "rgba(255,255,255,0.06)";
114+
return "transparent";
115+
}
116+
117+
function getChipColor(active: boolean, lit: boolean): string {
118+
if (active) return "#c7d2fe";
119+
if (lit) return "#d4d4d8";
120+
return "rgba(255,255,255,0.50)";
121+
}
122+
110123
function PresetButton({
111124
preset,
112125
icon,
@@ -137,12 +150,8 @@ function PresetButton({
137150
border: active
138151
? "1px solid rgba(129, 140, 248, 0.45)"
139152
: "1px solid rgba(255,255,255,0.07)",
140-
background: active
141-
? "linear-gradient(135deg, rgba(99,102,241,0.22), rgba(129,140,248,0.10))"
142-
: lit
143-
? "rgba(255,255,255,0.06)"
144-
: "transparent",
145-
color: active ? "#c7d2fe" : lit ? "#d4d4d8" : "rgba(255,255,255,0.50)",
153+
background: getChipBackground(active, lit),
154+
color: getChipColor(active, lit),
146155
fontSize: 12,
147156
fontWeight: 600,
148157
fontFamily: "inherit",

0 commit comments

Comments
 (0)