MCPcopy Create free account
hub / github.com/composify-js/composify / Text

Function Text

packages/react/src/ui/Text/Text.tsx:18–38  ·  view source on GitHub ↗
({ className, level, color, size, align, weight, tracking, leading, ...props })

Source from the content-addressed store, hash-verified

16const variants = createVariants(styles);
17
18export const Text: FC<Props> = ({ className, level, color, size, align, weight, tracking, leading, ...props }) => {
19 const Tag = level ? (`h${level}` as keyof JSX.IntrinsicElements) : 'p';
20
21 return (
22 <Tag
23 className={variants('text', {
24 className,
25 size,
26 align,
27 weight,
28 tracking,
29 leading,
30 ...(color?.startsWith('#') ? {} : { color }),
31 })}
32 style={{
33 ...(color?.startsWith('#') ? { color } : {}),
34 }}
35 {...props}
36 />
37 );
38};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected