mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
feat: dynamic color scales
This commit is contained in:
1 parent
32f6916266
commit
4c77cc2282
4 files changed
+20
-5
No files matched your search
@@ -35,14 +35,10 @@ export function Button({
|
||||
return (
|
||||
<button
|
||||
className={classNames("composable-radius", styles.button, className)}
|
||||
data-color={color}
|
||||
data-accent={color}
|
||||
data-variant={variant}
|
||||
data-light-text={variant === "solid"}
|
||||
data-radius={radius}
|
||||
style={{
|
||||
backgroundColor: color ? `var(--${color}-9)` : undefined,
|
||||
...style,
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -18,6 +18,15 @@ for (let i = 0; i < 12; i++) {
|
||||
styles += `--${alias}-${alpha ? "a" : ""}${n}:var(--${color}-${alpha ? "a" : ""}${n});`;
|
||||
}
|
||||
|
||||
styles += "}";
|
||||
|
||||
styles += `*[data-accent='${alias}']{`;
|
||||
|
||||
for (let i = 0; i < 12; i++) {
|
||||
const n = i + 1;
|
||||
styles += `--accent-${alpha ? "a" : ""}${n}:var(--${alias}-${alpha ? "a" : ""}${n});`;
|
||||
}
|
||||
|
||||
styles += "}";
|
||||
---
|
||||
|
||||
|
||||
@@ -39,6 +39,15 @@ for (let i = 0; i < 12; i++) {
|
||||
styles += `--${color}-${alpha ? "a" : ""}${n}:${value};`;
|
||||
}
|
||||
|
||||
styles += "}";
|
||||
|
||||
styles += `*[data-accent='${color}']{`;
|
||||
|
||||
for (let i = 0; i < 12; i++) {
|
||||
const n = i + 1;
|
||||
styles += `--accent-${alpha ? "a" : ""}${n}:var(--${color}-${alpha ? "a" : ""}${n});`;
|
||||
}
|
||||
|
||||
styles += "}";
|
||||
---
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ function LineInner({ line, lines }: LineProps) {
|
||||
return (
|
||||
<Fragment key={stage.tech_name}>
|
||||
<IconButton
|
||||
color="gray"
|
||||
variant={isSelected ? "solid" : "surface"}
|
||||
radius="1"
|
||||
className={styles.stage}
|
||||
|
||||
Reference in new issue
Block a user