({
label,
description,
errorMessage,
items,
children,
renderEmptyState,
...props
}: TagGroupProps<T>)
| 72 | } |
| 73 | |
| 74 | export function TagGroup<T>({ |
| 75 | label, |
| 76 | description, |
| 77 | errorMessage, |
| 78 | items, |
| 79 | children, |
| 80 | renderEmptyState, |
| 81 | ...props |
| 82 | }: TagGroupProps<T>) { |
| 83 | return ( |
| 84 | <AriaTagGroup {...props} className={twMerge('flex flex-col gap-2 font-sans', props.className)}> |
| 85 | <Label>{label}</Label> |
| 86 | <ColorContext.Provider value={props.color || 'gray'}> |
| 87 | <TagList items={items} renderEmptyState={renderEmptyState} className="flex flex-wrap gap-1"> |
| 88 | {children} |
| 89 | </TagList> |
| 90 | </ColorContext.Provider> |
| 91 | {description && <Description>{description}</Description>} |
| 92 | {errorMessage && ( |
| 93 | <Text slot="errorMessage" className="text-sm text-red-600"> |
| 94 | {errorMessage} |
| 95 | </Text> |
| 96 | )} |
| 97 | </AriaTagGroup> |
| 98 | ); |
| 99 | } |
| 100 | |
| 101 | const removeButtonStyles = tv({ |
| 102 | extend: focusRing, |
nothing calls this directly
no outgoing calls
no test coverage detected