function GuitarIcon({ fill }) {
return (
<svg width="28" height="28" fill="none" viewBox="0 0 28 28">
<path
fill={fill}
fillRule="evenodd"
d="M27.349 2.657L24.887.237c-.32-.32-.88-.319-1.183.023l-3.38 3.46a1.607 1.607 0 00-.423.863l-.123.722c-.041.321-.182.622-.424.863l-5.072 5.37-.04.046c-2.081-1.322-4.576-1.324-6.055.155l-.127.127c-1.356 1.358-3.226 3.23-4.953 3.951-.68.285-1.312.7-1.858 1.246-2.443 2.443-.991 5.328 1.684 8.004 2.675 2.675 5.56 4.127 8.004 1.684a5.764 5.764 0 001.246-1.859c.721-1.726 2.592-3.596 3.95-4.952l.127-.127c1.479-1.479 1.478-3.972.157-6.052.037-.033.073-.067.108-.104l5.051-5.347c.241-.242.523-.403.844-.444l.722-.123c.32-.041.622-.222.843-.444l3.38-3.46a.83.83 0 00-.016-1.182zM8.584 19.415a2.284 2.284 0 103.23-3.23 2.284 2.284 0 00-3.23 3.23z"
/>
</svg>
)
}
const colors = [
'#714dd8',
'#3c8bf7',
'#72bb52',
'#ff6767',
'#ffa833',
'#000000',
]
render(() => {
const [activeColor, setActiveColor] = React.useState('#000000')
return (
<Dropdown
triggerElement={
<StackView
width={10}
height={10}
alignment="center"
distribution="center"
stroke={activeColor === '#000000' ? 'separator' : activeColor}
strokeWeight={2}
spacing={1}
radius={5}
>
<GuitarIcon fill={activeColor} />
<Text size={4} weight={600} letterSpacing="0.05em">
Guitar
</Text>
</StackView>
}
title="Drums"
popoverProps={{
paddingHorizontal: 1,
paddingVertical: 1,
}}
>
<GridView columns="1fr 1fr 1fr" spacing={1}>
{colors.map((color, index) => (
<Dropdown.Item
key={color}
index={index}
width={4}
height={4}
backgroundColor={color}
highlightedColor={color + 'd1'}
stroke={color === activeColor ? color + '75' : undefined}
strokeWeight={2}
onSelect={() => setActiveColor(color)}
/>
))}
</GridView>
</Dropdown>
)
})