import cn from "classnames"; import React, { ButtonHTMLAttributes } from "react"; import s from "./Button.module.css"; interface Props extends ButtonHTMLAttributes { href?: string; className?: string; variant?: "filled" | "outlined" | "flat" | "none"; active?: boolean; disabled?: boolean; type?: "submit" | "reset" | "button"; } export default class Button extends React.Component { public render() { const { className, variant = "filled", children, disabled = false, href, active, ...rest } = this.props; let Component: React.ComponentType< React.ButtonHTMLAttributes & React.ClassAttributes > = "button" as any; const rootClassName = cn( s.root, { [s.filled]: variant === "filled", }, className ); return ( {children} ); } }