import { forwardRef } from 'react'; import { clsx } from 'clsx'; import { ThemeProvider, useTheme } from '@wise/components-theming'; import SentimentSurface from '../SentimentSurface'; import { TagProps } from './Tag.types'; /** * Tag is a small, non-interactive label that categorises or highlights a piece of content. * * @param {string} label - The text of the tag, kept to a word or two. * @param {Sentiment} [sentiment='neutral'] - Optional prop to set the sentiment type (negative, warning, neutral, success, proposition). * @param {TagSize} [size='small'] - Optional prop to set the size of the tag (small or large). * @param {Emphasis} [emphasis='base'] - Optional prop to specify the emphasis level (base or elevated). * @param {boolean} [overMedia=false] - If true, renders the tag for use over media, keeping the colours it uses in dark screen modes. * @param {string} [className] - Additional CSS classes to apply. * @param {string} [id] - Unique identifier for the component. * @param {string} [data-testid] - A unique string that appears as data attribute `data-testid` in the rendered code. * * @component * @example * ```tsx * * ``` * * @see {@link https://storybook.wise.design/?path=/docs/tag--docs|Storybook Wise Design} */ const Tag = forwardRef(function Tag( { label, sentiment = 'neutral', size = 'small', emphasis = 'base', overMedia = false, className, id, 'data-testid': dataTestId, }, ref, ) { const { theme, screenMode } = useTheme(); return ( {label} ); }); export default Tag;