ticket_manager/client/src/components/Button.tsx

27 lines
469 B
TypeScript

import React, { FC, MouseEvent } from "react";
interface IProps {
icon?: string;
size?: string;
shape?: string;
color?: string;
text?: string;
onClick?: (e: MouseEvent) => void;
}
export const Button: FC<IProps> = ({
size = "small",
shape = "",
color,
onClick,
children
}) => {
return (
<button
className={`waves-effect waves-light btn-${size} ${shape} ${color}`}
onClick={onClick}
>
{children}
</button>
);
};