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

Function baseColor

packages/@react-spectrum/s2/style/spectrum-theme.ts:241–250  ·  view source on GitHub ↗
(
  base: BaseColor | C
)

Source from the content-addressed store, hash-verified

239 * references.
240 */
241export function baseColor<C extends string = BaseColor>(
242 base: BaseColor | C
243): {default: C; isHovered: C; isFocusVisible: C; isPressed: C} {
244 return {
245 default: base as C,
246 isHovered: `${base}:hovered` as C,
247 isFocusVisible: `${base}:focused` as C,
248 isPressed: `${base}:pressed` as C
249 };
250}
251
252type SpectrumColor = Color<BaseColor> | ArbitraryValue;
253

Callers 15

ButtonExample.tsxFile · 0.90
Tabs.tsxFile · 0.90
PlacementControlItemFunction · 0.90
Link.tsxFile · 0.90
Header.tsxFile · 0.90
MobileHeader.tsxFile · 0.90
CodeFold.tsxFile · 0.90
ResponseStatus.tsxFile · 0.90
MessageSource.tsxFile · 0.90
AttachmentList.tsxFile · 0.90
PromptTokenFieldFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected