mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
27 lines
512 B
TypeScript
27 lines
512 B
TypeScript
import cn from "classnames";
|
|
import * as styles from "./button.css";
|
|
|
|
export interface ButtonProps
|
|
extends React.DetailedHTMLProps<
|
|
React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
HTMLButtonElement
|
|
> {
|
|
theme?: keyof typeof styles.button;
|
|
}
|
|
|
|
export function Button({
|
|
children,
|
|
theme = "primary",
|
|
className,
|
|
...props
|
|
}: ButtonProps) {
|
|
return (
|
|
<button
|
|
{...props}
|
|
type="button"
|
|
className={cn(styles.button[theme], className)}
|
|
>
|
|
{children}
|
|
</button>
|
|
);
|
|
}
|