badge
This commit is contained in:
parent
c39f9eff8b
commit
4c17fb9488
|
|
@ -1,9 +1,9 @@
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import tw from "twin.macro";
|
import tw, { TwStyle } from "twin.macro";
|
||||||
import "styled-components/macro";
|
import "styled-components/macro";
|
||||||
import { ComponentProps, forwardRef } from "react";
|
import { ComponentProps, forwardRef } from "react";
|
||||||
|
|
||||||
export const Badge = forwardRef<HTMLParagraphElement, { color: string, text: string | number }>(({ color, text, ...props }, ref) => {
|
export const Badge = forwardRef<HTMLParagraphElement, { color: string | TwStyle, text: string | number }>(({ color, text, ...props }, ref) => {
|
||||||
const colors = {
|
const colors = {
|
||||||
yellow: tw`bg-yellow-500`,
|
yellow: tw`bg-yellow-500`,
|
||||||
gray: tw`bg-gray-500`,
|
gray: tw`bg-gray-500`,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user