mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-22 13:26:17 +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
@@ -5,8 +5,35 @@ import "./index.css";
|
||||
|
||||
export interface ButtonProps extends ComponentProps<"button"> {
|
||||
color?: Color;
|
||||
variant?: "solid";
|
||||
}
|
||||
|
||||
export function Button({ className, ...props }: ButtonProps) {
|
||||
return <button className={classNames("button", className)} {...props} />;
|
||||
const LIGHT_TEXT_COLORS = new Set<Color>([
|
||||
"purple",
|
||||
"gold",
|
||||
"bronze",
|
||||
"teal",
|
||||
"grass",
|
||||
]);
|
||||
|
||||
export function Button({
|
||||
className,
|
||||
color,
|
||||
variant = "solid",
|
||||
style,
|
||||
...props
|
||||
}: ButtonProps) {
|
||||
return (
|
||||
<button
|
||||
className={classNames("button", className)}
|
||||
data-color={color}
|
||||
data-variant={variant}
|
||||
data-light-text={color ? LIGHT_TEXT_COLORS.has(color) : undefined}
|
||||
style={{
|
||||
backgroundColor: color ? `var(--${color}-9)` : undefined,
|
||||
...style,
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user