(props: AriaColorSwatchProps)
| 3 | import './ColorSwatch.css'; |
| 4 | |
| 5 | export function ColorSwatch(props: AriaColorSwatchProps) { |
| 6 | let {colorSwatchProps, color} = useColorSwatch(props); |
| 7 | |
| 8 | return ( |
| 9 | <div |
| 10 | {...colorSwatchProps} |
| 11 | className="react-aria-ColorSwatch" |
| 12 | style={{ |
| 13 | ...colorSwatchProps.style, |
| 14 | // The color (and the checkerboard for transparency) comes from the resolved color. |
| 15 | background: `linear-gradient(${color}, ${color}), |
| 16 | repeating-conic-gradient(#CCC 0% 25%, white 0% 50%) 50% / 16px 16px` |
| 17 | }} |
| 18 | /> |
| 19 | ); |
| 20 | } |
nothing calls this directly
no test coverage detected