layerchart
layerchart copied to clipboard
[Tooltip] Improve structure and default styles
TODO
- [ ] Improve structure
- [ ] Improve default styling
- [ ] Support TooltipItem colors
- [ ] Add default slot implementation
Instead of
<Tooltip header={(data) => formatDate(data.date, "eee, MMMM do")} let:data>
<TooltipItem label="value" value={data.value} />
</Tooltip>
a better structure
<Tooltip let:data>
<TooltipHeader>{formatDate(data.date, "eee, MMMM do")}</TooltipHeader>
<TooltipItem label="value" value={data.value} />
</Tooltip>
With this structure, TooltipHeader will need to use col-span-full since it will be within the default slots's grid