Skip to content

Commit

Permalink
feat: allow to pass children in calendar component
Browse files Browse the repository at this point in the history
affects: @medly-components/core
  • Loading branch information
gmukul01 committed Nov 5, 2023
1 parent 0e368c3 commit f60f632
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/src/components/Calendar/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<CalendarProps> = memo(
({ date, onChange, minSelectableDate, maxSelectableDate, isErrorPresent, defaultMonth = 0, defaultYear, ...restProps }) => {
Expand Down Expand Up @@ -96,6 +96,7 @@ const Component: FC<CalendarProps> = memo(
);
})}
</Styled.CalendarGrid>
{restProps.children}
</Styled.Calendar>
);
}
Expand Down

0 comments on commit f60f632

Please sign in to comment.