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

Function getBackgroundColor

packages/dev/s2-docs/src/ExampleOutput.tsx:70–77  ·  view source on GitHub ↗
(staticColor: 'black' | 'white' | undefined)

Source from the content-addressed store, hash-verified

68}
69
70function getBackgroundColor(staticColor: 'black' | 'white' | undefined) {
71 if (staticColor === 'black') {
72 return 'linear-gradient(to right,#ddd6fe,#fbcfe8)';
73 } else if (staticColor === 'white') {
74 return 'linear-gradient(to right,#0f172a,#334155)';
75 }
76 return undefined;
77}
78
79class ErrorBoundary extends Component<{children: ReactNode}, {error: string | null}> {
80 constructor(props) {

Callers 1

ExampleOutputFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected