diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/Button.tsx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 5724b40..bf98755 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -1,18 +1,18 @@ import React, { useCallback } from 'react'; import { useHistory } from 'react-router-dom'; -interface Props { - onClick?: () => void; - route?: string; - variant?: 'contained' | 'outlined'; - size?: 'sm' | 'md' | 'lg'; +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: 'border-2 border-black', + outlined: '', }; const sizes = { @@ -29,7 +29,7 @@ const Button: React.FC<Props> = ({ onClick, route, variant = 'contained', size = <button type="button" onClick={route ? navigateRoute : onClick} - className={`m-3 font-bold tracking-wide hover:underline focus:outline-none ${variants[variant]} ${sizes[size]}`} + className={`m-3 font-bold tracking-wide hover:underline focus:outline-none border-2 border-black ${variants[variant]} ${sizes[size]}`} > {children} </button> |