mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
softer buttons
This commit is contained in:
1 parent
4c77cc2282
commit
6d2573ee95
4 files changed
+8
-11
No files matched your search
@@ -27,9 +27,12 @@
|
|||||||
background-color: var(--accent-8);
|
background-color: var(--accent-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
&[data-variant="surface"] {
|
&[data-variant="surface"],
|
||||||
|
&[data-variant="soft"] {
|
||||||
background-color: var(--accent-3);
|
background-color: var(--accent-3);
|
||||||
|
}
|
||||||
|
|
||||||
outline: var(--space-1) solid var(--accent-4);
|
&[data-variant="surface"] {
|
||||||
|
outline: var(--space-1) solid var(--accent-6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,7 @@ import styles from "./index.module.css";
|
|||||||
export interface ButtonProps extends ComponentProps<"button"> {
|
export interface ButtonProps extends ComponentProps<"button"> {
|
||||||
color?: Color;
|
color?: Color;
|
||||||
radius?: `${1 | 2 | 3}` | "max";
|
radius?: `${1 | 2 | 3}` | "max";
|
||||||
variant?: "solid" | "surface";
|
variant?: "solid" | "surface" | "soft";
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LIGHT_TEXT_COLORS = new Set<Color>([
|
export const LIGHT_TEXT_COLORS = new Set<Color>([
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
import { classNames } from "../../core/ui/classNames";
|
import { classNames } from "../../core/ui/classNames";
|
||||||
import type { Color } from "../../core/ui/color";
|
|
||||||
import { Button, type ButtonProps } from "../Button";
|
import { Button, type ButtonProps } from "../Button";
|
||||||
import styles from "./index.module.css";
|
import styles from "./index.module.css";
|
||||||
|
|
||||||
export interface IconButtonProps extends ButtonProps {
|
|
||||||
color?: Color;
|
|
||||||
variant?: "solid";
|
|
||||||
}
|
|
||||||
|
|
||||||
export function IconButton({ className, ...props }: ButtonProps) {
|
export function IconButton({ className, ...props }: ButtonProps) {
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ function LineInner({ line, lines }: LineProps) {
|
|||||||
return (
|
return (
|
||||||
<Fragment key={stage.tech_name}>
|
<Fragment key={stage.tech_name}>
|
||||||
<IconButton
|
<IconButton
|
||||||
color="gray"
|
color={isSelected ? undefined : "gray"}
|
||||||
variant={isSelected ? "solid" : "surface"}
|
variant={isSelected ? "surface" : "soft"}
|
||||||
radius="1"
|
radius="1"
|
||||||
className={styles.stage}
|
className={styles.stage}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
Reference in new issue
Block a user