Closed techniq closed 2 months ago
Instead of
<Tooltip header={(data) => formatDate(data.date, "eee, MMMM do")} let:data> <TooltipItem label="value" value={data.value} /> </Tooltip>
a better structure
<Tooltip.Root let:data> <Tooltip.Header>{formatDate(data.date, "eee, MMMM do")}</Tooltip.Header> <Tooltip.List> <Tooltip.Item label="value" value={data.value} /> </Tooltip.List> </Tooltip.Root>
With this structure, TooltipHeader will need to use col-span-full since it will be within the default slots's grid
TooltipHeader
col-span-full
grid
Reference for improved default styling
See also:
Instead of
a better structure
With this structure,
TooltipHeader
will need to usecol-span-full
since it will be within the default slots'sgrid