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

Function ColorSwatch

starters/docs/src/ColorSwatch.tsx:8–18  ·  view source on GitHub ↗
(props: ColorSwatchProps)

Source from the content-addressed store, hash-verified

6import './ColorSwatch.css';
7
8export function ColorSwatch(props: ColorSwatchProps) {
9 return (
10 <AriaColorSwatch
11 {...props}
12 style={({color}) => ({
13 background: `linear-gradient(${color}, ${color}),
14 repeating-conic-gradient(#CCC 0% 25%, white 0% 50%) 50% / 16px 16px`
15 })}
16 />
17 );
18}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected