From fefe2e990a58d1f7691ae29710ab6ba0d06a1e4b Mon Sep 17 00:00:00 2001 From: filantrop Date: Thu, 4 Aug 2022 18:54:15 +0300 Subject: [PATCH] create badge component --- src/components/Badge.tsx | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/components/Badge.tsx diff --git a/src/components/Badge.tsx b/src/components/Badge.tsx new file mode 100644 index 0000000..f74404a --- /dev/null +++ b/src/components/Badge.tsx @@ -0,0 +1,51 @@ +/* -------------------------------------------------------------------------- */ +/* Imports */ +/* -------------------------------------------------------------------------- */ + +import classNames from "classnames"; +import { StyleType } from "core/_variants"; +import React from "react"; + +/* -------------------------------------------------------------------------- */ +/* Component props */ +/* -------------------------------------------------------------------------- */ + +type Props = { + emphasis?: StyleType; + children: React.ReactNode; + className?: string; + iconed?: boolean; + onClick?: () => void; +} & Omit, "">; + +/* -------------------------------------------------------------------------- */ +/* Component implementation */ +/* -------------------------------------------------------------------------- */ + +function Badge({ + className, + children, + onClick, + emphasis = "low", + ...props +}: Props): JSX.Element { + return ( + + {children} + + ); +} +export default Badge;