import React from 'react' import { type Meta, type StoryObj } from '@storybook/react-vite' import Tag, { tagColorList } from './Tag' import { DocsTemplate } from '../../../.storybook' import { replaceSymbol } from '../../services/HelperService' const meta: Meta = { title: 'Components/Tag', component: Tag, parameters: { design: { type: 'figma', url: 'https://www.figma.com/design/RvhKD82948FMQnh5MyCi0o/Web-Design-System?node-id=121-334&t=CdMnrLNv0lNFwXr0-0', }, docs: { page: () => ( The Tag component is a small, colorful box designed to display concise text and represent various status indicators, labels, or categories. It serves as a visual label that helps users quickly identify and categorize different elements within the interface. Tags are commonly used to add context and improve the organization of information. } infoBullets={[ Keep the text inside the Tag brief but descriptive, conveying relevant information at a glance. , Ensure the Tag component remains consistent in color usage across an application to maintain visual harmony and a polished user experience. , ]} /> ), }, }, } export default meta type Story = StoryObj const Template: Story = { render: (args) => { return }, } export const Single: Story = { ...Template, args: { children: 'Blue', color: 'blue', }, } const AllTemplate: Story = { render: () => { return (
{tagColorList.map((tagColor) => ( {replaceSymbol(tagColor, ' ', '-')} ))}
) }, } export const AllVariations: Story = { ...AllTemplate, args: {}, }