mirror of
https://github.com/muerwre/markdown-home-tab.git
synced 2025-04-25 08:56:41 +07:00
made human-friendly editing buttons
This commit is contained in:
parent
6d854f57a5
commit
02333e6049
15 changed files with 175 additions and 28 deletions
31
src/components/buttons/Button/index.tsx
Normal file
31
src/components/buttons/Button/index.tsx
Normal file
|
@ -0,0 +1,31 @@
|
|||
import classNames from "classnames";
|
||||
import React, { FC } from "react";
|
||||
import styles from "./styles.module.scss";
|
||||
|
||||
interface ButtonProps
|
||||
extends React.DetailedHTMLProps<
|
||||
React.ButtonHTMLAttributes<HTMLButtonElement>,
|
||||
HTMLButtonElement
|
||||
> {
|
||||
variant?: "solid" | "outline";
|
||||
size?: "normal" | "small";
|
||||
}
|
||||
|
||||
const Button: FC<ButtonProps> = ({
|
||||
variant = "solid",
|
||||
size = "normal",
|
||||
className,
|
||||
...rest
|
||||
}) => (
|
||||
<button
|
||||
className={classNames(
|
||||
styles.button,
|
||||
styles[`variant-${variant}`],
|
||||
styles[`size-${size}`],
|
||||
className
|
||||
)}
|
||||
{...rest}
|
||||
/>
|
||||
);
|
||||
|
||||
export { Button };
|
Loading…
Add table
Add a link
Reference in a new issue