From f60f632c7122039e791f1f12a7d8edabc211f07f Mon Sep 17 00:00:00 2001 From: Mukul Bansal Date: Sun, 5 Nov 2023 15:44:13 +0530 Subject: [PATCH] feat: allow to pass children in calendar component affects: @medly-components/core --- packages/core/src/components/Calendar/Calendar.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/src/components/Calendar/Calendar.tsx b/packages/core/src/components/Calendar/Calendar.tsx index a75e75f6d..bc4864954 100644 --- a/packages/core/src/components/Calendar/Calendar.tsx +++ b/packages/core/src/components/Calendar/Calendar.tsx @@ -6,10 +6,10 @@ import { memo, useCallback, useContext, useEffect, useMemo, useState } from 'rea import { PopoverContext } from '../Popover/Popover.context'; import Text from '../Text'; import * as Styled from './Calendar.styled'; -import { getCalendarDates, getMonthAndYearFromDate, getNextMonthAndYear, getPreviousMonthAndYear, isSameDay, isSameMonth } from './helper'; import MonthAndYearSelection from './MonthAndYearSelection'; -import { CalendarProps } from './types'; import WeekDays from './WeekDays'; +import { getCalendarDates, getMonthAndYearFromDate, getNextMonthAndYear, getPreviousMonthAndYear, isSameDay, isSameMonth } from './helper'; +import { CalendarProps } from './types'; const Component: FC = memo( ({ date, onChange, minSelectableDate, maxSelectableDate, isErrorPresent, defaultMonth = 0, defaultYear, ...restProps }) => { @@ -96,6 +96,7 @@ const Component: FC = memo( ); })} + {restProps.children} ); }