MCPcopy Index your code
hub / github.com/Tailframes/react-components / Tag

Function Tag

components/tag.tsx:47–64  ·  view source on GitHub ↗
({ variant = 'primary', className, startAdornment, endAdornment, children, ...rest }: TagProps)

Source from the content-addressed store, hash-verified

45}
46
47export function Tag({ variant = 'primary', className, startAdornment, endAdornment, children, ...rest }: TagProps) {
48 return (
49 <div
50 className={clsxMerge(
51 tagVariants({ variant, startAdornment: Boolean(startAdornment), endAdornment: Boolean(endAdornment) }),
52 className
53 )}
54 >
55 {startAdornment && (
56 <div className='inline-flex size-[18px] items-center justify-start overflow-hidden'>{startAdornment}</div>
57 )}
58 <span {...rest}>{children}</span>
59 {endAdornment && (
60 <div className='inline-flex size-[18px] items-center justify-end overflow-hidden'>{endAdornment}</div>
61 )}
62 </div>
63 );
64}
65
66Tag.displayName = 'Tag';

Callers

nothing calls this directly

Calls 1

clsxMergeFunction · 0.90

Tested by

no test coverage detected