This commit is contained in:
honzapatCZ 2025-01-13 19:04:56 +01:00
parent c39f9eff8b
commit 4c17fb9488

View File

@ -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`,