MCPcopy Create free account
hub / github.com/adobe/react-spectrum / TextColorsDisclosure

Function TextColorsDisclosure

packages/dev/s2-docs/src/S2Colors.tsx:79–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77}
78
79export function TextColorsDisclosure() {
80 return (
81 <Disclosure isQuiet>
82 <DisclosureTitle>Text colors</DisclosureTitle>
83 <DisclosurePanel>
84 <p>
85 The color property supports the following values, in addition to the semantic and global
86 colors. These colors are specifically chosen to be used as text colors, so prefer them
87 over global colors where possible.
88 </p>
89 <div className="sb-unstyled" style={{columnWidth: 120}}>
90 <Color name="accent" className={colorSwatch('accent', 'color')} />
91 <Color name="neutral" className={colorSwatch('neutral', 'color')} />
92 <Color name="neutral-subdued" className={colorSwatch('neutral-subdued', 'color')} />
93 <Color name="negative" className={colorSwatch('negative', 'color')} />
94 <Color name="disabled" className={colorSwatch('disabled', 'color')} />
95 <Color name="heading" className={colorSwatch('heading', 'color')} />
96 <Color name="title" className={colorSwatch('title', 'color')} />
97 <Color name="body" className={colorSwatch('body', 'color')} />
98 <Color name="detail" className={colorSwatch('detail', 'color')} />
99 <Color name="code" className={colorSwatch('code', 'color')} />
100 </div>
101 </DisclosurePanel>
102 </Disclosure>
103 );
104}
105
106export function SemanticColorsDisclosure() {
107 return (

Callers

nothing calls this directly

Calls 1

colorSwatchFunction · 0.90

Tested by

no test coverage detected