Swatch

Use the Swatch component to render a group of colors. Clicking one of the color will execute onClick callback, that can be passed as a prop.

<Swatch colors={['#D50032']} />
<Swatch colors={['#D50032', '#1B7742', '#0033A0']} />

Props

PropTypeDescription
colorsarraySets swatch colors
onClickfunctionCallback function that accepts selected color as parameter