mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-14 21:26:08 +01:00
feat: finalize tool cards
This commit is contained in:
1 parent
9096644d51
commit
01a58f9aa8
13 files changed
+143
-45
No files matched your search
@@ -4,4 +4,24 @@
|
||||
&[data-size="minor"] {
|
||||
font-size: var(--font-size-minor);
|
||||
}
|
||||
|
||||
&[data-weight="light"] {
|
||||
font-weight: var(--weight-light);
|
||||
}
|
||||
|
||||
&[data-weight="regular"] {
|
||||
font-weight: var(--weight-regular);
|
||||
}
|
||||
|
||||
&[data-weight="medium"] {
|
||||
font-weight: var(--weight-medium);
|
||||
}
|
||||
|
||||
&[data-weight="bold"] {
|
||||
font-weight: var(--weight-bold);
|
||||
}
|
||||
|
||||
&[data-weight="black"] {
|
||||
font-weight: var(--weight-black);
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import "./index.css";
|
||||
|
||||
export interface TextProps extends ComponentProps<"span"> {
|
||||
color?: Color;
|
||||
weight?: "light" | "regular" | "medium" | "bold" | "black";
|
||||
lowContrast?: boolean;
|
||||
size?: "regular" | "minor";
|
||||
}
|
||||
@@ -14,13 +15,16 @@ export function Text({
|
||||
lowContrast,
|
||||
className,
|
||||
size = "regular",
|
||||
weight,
|
||||
style,
|
||||
...props
|
||||
}: TextProps) {
|
||||
return (
|
||||
<span
|
||||
className={classNames("text", className)}
|
||||
style={{ color: `var(--${color}-${lowContrast ? 11 : 12})` }}
|
||||
style={{ color: `var(--${color}-${lowContrast ? 11 : 12})`, ...style }}
|
||||
data-size={size}
|
||||
data-weight={weight}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user