mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
first commit
This commit is contained in:
commit
91b1341271
165 changed files with 20993 additions and 0 deletions
27
src/renderer/components/button/button.tsx
Normal file
27
src/renderer/components/button/button.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue