import React, { useCallback } from 'react'; import { useHistory } from 'react-router-dom'; export interface Props extends React.ButtonHTMLAttributes { onClick?: () => void; route?: string; variant?: 'contained' | 'outlined'; size?: 'sm' | 'md' | 'lg'; children?: string; } const variants = { contained: 'bg-black text-white hover:underline ring-gray-400', outlined: 'bg-white hover:shadow border border-gray-300 ring-gray-200', }; const sizes = { lg: 'p-5', md: 'p-4', sm: 'p-3', }; const style = 'm-2 rounded-sm font-semibold focus:outline-none active:ring-2'; const Button: React.FC = ({ onClick, route, variant = 'contained', size = 'md', type = 'button', ...props }) => { const history = useHistory(); const navigateRoute = useCallback(() => history.push(route || '/'), [route, history]); return (