import React, { useCallback } from 'react'; import { useHistory } from 'react-router-dom'; export type Props = Partial<{ onClick: () => void; route: string; variant: 'contained' | 'outlined'; size: 'sm' | 'md' | 'lg'; children: string; }> const variants = { contained: 'bg-black text-white', outlined: '', }; const sizes = { lg: 'p-5', md: 'p-4', sm: 'p-3', }; const Button: React.FC = ({ onClick, route, variant = 'contained', size = 'md', children }) => { const history = useHistory(); const navigateRoute = useCallback(() => history.push(route || '/'), [route, history]); return ( ); }; export default Button;