From 847294d82615309a383645bccc6fd0360ea765a3 Mon Sep 17 00:00:00 2001 From: Guillermo Pages Date: Fri, 7 Feb 2025 15:45:08 +0100 Subject: [PATCH] fix: ts errors --- src/components/calendar/Controls.tsx | 22 ++++++++++++---------- src/components/calendar/Week/types.ts | 17 ----------------- 2 files changed, 12 insertions(+), 27 deletions(-) delete mode 100644 src/components/calendar/Week/types.ts diff --git a/src/components/calendar/Controls.tsx b/src/components/calendar/Controls.tsx index 6806b10..ba2377c 100644 --- a/src/components/calendar/Controls.tsx +++ b/src/components/calendar/Controls.tsx @@ -10,12 +10,12 @@ interface ControlsProps { monthCutoff: MonthCutoffType; size: DaySize; fontProportion: number; - magnify: boolean; + magnify?: boolean; onHeaderStyleChange: (type: HeaderStyle) => void; onMonthCutoffChange: (type: MonthCutoffType) => void; onSizeChange: (size: DaySize) => void; onFontProportionChange: (proportion: number) => void; - onMagnifyChange: (magnify: boolean) => void; + onMagnifyChange?: (magnify: boolean) => void; } export const Controls: React.FC = ({ @@ -113,14 +113,16 @@ export const Controls: React.FC = ({ - - - + {(magnify !== undefined && onMagnifyChange !== undefined && ( + + + + )) || null}