We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cellSize
1 parent dc9ae2e commit 13c163cCopy full SHA for 13c163c
2 files changed
.changeset/four-taxes-beam.md
@@ -0,0 +1,5 @@
1
+---
2
+'layerchart': patch
3
4
+
5
+fix(Calendar): Pass `cellSize` to children snippet (useful when responsive)
packages/layerchart/src/lib/components/Calendar.svelte
@@ -43,7 +43,7 @@
43
*/
44
tooltipContext?: TooltipContextValue;
45
46
- children?: Snippet<[{ cells: CalendarCell[] }]>;
+ children?: Snippet<[{ cells: CalendarCell[]; cellSize: [number, number] }]>;
47
} & Omit<
48
RectPropsWithoutHTML,
49
'children' | 'x' | 'y' | 'width' | 'height' | 'fill' | 'onpointermove' | 'onpointerleave'
@@ -117,7 +117,7 @@
117
</script>
118
119
{#if children}
120
- {@render children({ cells })}
+ {@render children({ cells, cellSize })}
121
{:else}
122
{#each cells as cell}
123
<Rect
0 commit comments