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}