diff options
author | eug-vs <eug-vs@keemail.me> | 2021-03-14 03:25:13 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2021-03-14 03:25:13 +0300 |
commit | f745dcdbe22e7d278a2ef7b0e29af7e86b48ca4b (patch) | |
tree | 099fe567f03faa86e51ce83e6918830d229d7fe0 /src/components | |
parent | e1fc8ea5904de90f94d3f63287555c75067846ac (diff) | |
download | commercel-ui-f745dcdbe22e7d278a2ef7b0e29af7e86b48ca4b.tar.gz |
feat: create initial ProductForm
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> |