mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-25 15:56:19 -05:00
* More global css * Migrate 404.tsx * Header.tsx partial * links.tsx * 500.tsx * AbilityIcon.tsx * BuildStats.tsx progress * about.tsx * admin.tsx * Adjust button border * Stylelint
26 lines
551 B
TypeScript
26 lines
551 B
TypeScript
import classNames from "classnames";
|
|
import { ButtonHTMLAttributes, DetailedHTMLProps } from "react";
|
|
import styles from "./Button.module.css";
|
|
|
|
const Button = ({
|
|
isLoading = false,
|
|
...props
|
|
}: DetailedHTMLProps<
|
|
ButtonHTMLAttributes<HTMLButtonElement>,
|
|
HTMLButtonElement
|
|
> & {
|
|
isLoading?: boolean;
|
|
}) => {
|
|
return (
|
|
<button
|
|
{...props}
|
|
className={classNames(props.className, styles.button, {
|
|
[styles.disabled]: isLoading,
|
|
})}
|
|
disabled={props.disabled || isLoading}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default Button;
|