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

Function getBackgroundColor

packages/@react-spectrum/s2/stories/utils.tsx:26–33  ·  view source on GitHub ↗
(staticColor: StaticColor)

Source from the content-addressed store, hash-verified

24type StaticColor = 'black' | 'white' | 'auto' | undefined;
25
26function getBackgroundColor(staticColor: StaticColor) {
27 if (staticColor === 'black') {
28 return 'linear-gradient(to right,#ddd6fe,#fbcfe8)';
29 } else if (staticColor === 'white') {
30 return 'linear-gradient(to right,#0f172a,#334155)';
31 }
32 return undefined;
33}
34
35export function StaticColorProvider(props: {
36 children: ReactNode;

Callers 1

StaticColorProviderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected