import { JSX } from '@redneckz/uni-jsx'; import { type ComponentType } from '../../model/ComponentType'; import { Img } from '../../ui-kit/Img/Img'; import { Text } from '../../ui-kit/Text/Text'; import { type TextColor } from '../../ui-kit/Text/TextProps'; import { style } from '../../utils/style'; const colorStyle: Record = { yellow: { border: 'border-yellow-light', text: 'text-yellow' }, green: { border: 'border-green-more-light', text: 'text-green-dark' }, gray: { border: 'border-gray', text: 'text-secondary-text' }, red: { border: 'border-error/30', text: 'text-error' }, }; export interface BadgeProps extends ComponentType { color?: keyof typeof colorStyle; } export const Badge = JSX(({ className, children, color = 'gray' }) => (
{children}
));