From 192534b14f5fc61997eec11a7126ef121ac6a9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Mon, 1 Feb 2021 21:33:39 +0900 Subject: [PATCH] feat: added button component --- components/Button.tsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 components/Button.tsx diff --git a/components/Button.tsx b/components/Button.tsx new file mode 100644 index 0000000..30de42e --- /dev/null +++ b/components/Button.tsx @@ -0,0 +1,23 @@ +import Link from 'next/link' + +const Button = ({ type='button', className='', children, href, onClick }: ButtonProps):JSX.Element => { + return href ? + + { children } + + : onClick ? : +} + +interface ButtonProps { + type?: 'button' | 'submit' | 'reset' + className?: string + children: JSX.Element | JSX.Element[] | string + href?: string + onClick?: () => void +} + +export default Button \ No newline at end of file