From 2b05b6f7a8a68a3e13bf85c8b02acd766dacb185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Sat, 9 Jan 2021 21:53:08 +0900 Subject: [PATCH] feat: added center props --- components/LongButton.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/components/LongButton.tsx b/components/LongButton.tsx index 216f0af..67029bb 100644 --- a/components/LongButton.tsx +++ b/components/LongButton.tsx @@ -1,17 +1,17 @@ /* eslint-disable jsx-a11y/no-static-element-interactions */ import Link from 'next/link' -const LongButton = ({ children, href, onClick }:LongButtonProps):JSX.Element => { +const LongButton = ({ children, href, onClick, center=false }:LongButtonProps):JSX.Element => { if(href) return -
+
{children}
- if(onClick) return
+ if(onClick) return
{children}
- return
+ return
{children}
@@ -24,5 +24,6 @@ export default LongButton interface LongButtonProps { onClick?: (event: React.KeyboardEvent|React.MouseEvent) => void children: JSX.Element | JSX.Element[] - href?: string + href?: string + center?: boolean } \ No newline at end of file