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

Function ColorSwatch

starters/tailwind/src/ColorSwatch.tsx:9–23  ·  view source on GitHub ↗
(props: ColorSwatchProps)

Source from the content-addressed store, hash-verified

7import {composeTailwindRenderProps} from './utils';
8
9export function ColorSwatch(props: ColorSwatchProps) {
10 return (
11 <AriaColorSwatch
12 {...props}
13 className={composeTailwindRenderProps(
14 props.className,
15 'w-8 h-8 box-border rounded-md border border-black/10'
16 )}
17 style={({color}) => ({
18 background: `linear-gradient(${color}, ${color}),
19 repeating-conic-gradient(#CCC 0% 25%, white 0% 50%) 50% / 16px 16px`
20 })}
21 />
22 );
23}

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected