summaryrefslogtreecommitdiff
path: root/src/components/Button.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-14 03:25:13 +0300
committereug-vs <eug-vs@keemail.me>2021-03-14 03:25:13 +0300
commitf745dcdbe22e7d278a2ef7b0e29af7e86b48ca4b (patch)
tree099fe567f03faa86e51ce83e6918830d229d7fe0 /src/components/Button.tsx
parente1fc8ea5904de90f94d3f63287555c75067846ac (diff)
downloadcommercel-ui-f745dcdbe22e7d278a2ef7b0e29af7e86b48ca4b.tar.gz
feat: create initial ProductForm
Diffstat (limited to 'src/components/Button.tsx')
-rw-r--r--src/components/Button.tsx16
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>