import React from 'react'; import { Button, Label, Tag as RACTag, TagGroup as RACTagGroup, type TagGroupProps as RACTagGroupProps, TagList, type TagListProps, type TagProps, Text, } from 'react-aria-components'; export interface TagGroupProps extends Omit, Pick, 'items' | 'children' | 'renderEmptyState'> { label?: string; description?: string; errorMessage?: string; } export function TagGroup({ label, description, errorMessage, items, children, renderEmptyState, ...props }: TagGroupProps) { return ( {children} {description && {description}} {errorMessage && {errorMessage}} ); } export function Tag({ children, ...props }: TagProps) { const textValue = typeof children === 'string' ? children : undefined; return ( {({ allowsRemoving }) => ( <> {children} {allowsRemoving && } )} ); }