From 07f2ee6966e93911fabcdb5edc23415436788969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Fri, 8 Jan 2021 22:19:10 +0900 Subject: [PATCH] feat: added props --- components/Tag.tsx | 66 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 55 insertions(+), 11 deletions(-) diff --git a/components/Tag.tsx b/components/Tag.tsx index 0a74e85..ae722e6 100644 --- a/components/Tag.tsx +++ b/components/Tag.tsx @@ -1,18 +1,62 @@ import Link from 'next/link' -const Tag = ({ href, text, circular=false, dark=false, marginBottom=2 }:LabelProps):JSX.Element => { - return href ? - {text} - : {text} +const Tag = ({ + blurple = false, + github = false, + href, + text, + className, + circular = false, + dark = false, + marginBottom = 2, +}: LabelProps): JSX.Element => { + return href ? ( + + + {text} + + + ) : ( + + {text} + + ) } interface LabelProps { - href?: string - text: string | JSX.Element | JSX.Element[] - icon?: string - circular?: boolean - dark?: boolean - marginBottom?: number + blurple?: boolean + github?: boolean + href?: string + text: string | JSX.Element | JSX.Element[] + className?: string + icon?: string + circular?: boolean + dark?: boolean + marginBottom?: number } -export default Tag \ No newline at end of file +export default Tag