Skip to content

Commit

Permalink
Update Storybook Visual Test RTL Example
Browse files Browse the repository at this point in the history
  • Loading branch information
Ismail Gunsaya committed Jul 24, 2023
1 parent 93e10b2 commit e1a6c96
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions examples/bpk-component-calendar/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,27 @@ const FocusedDateInThePastExample = () => (
/>
);

const RangeDateCalendarExample = (isRTL = false) => (
<div style={{ direction: isRTL ? 'rtl' : 'ltr' }}>
const RangeDateCalendarExample = () => (
<CalendarContainer
minDate={new Date(2020, 3, 1)}
id="myCalendar"
formatMonth={formatMonth}
formatDateFull={formatDateFull}
daysOfWeek={weekDays}
weekStartsOn={1}
changeMonthLabel="Change month"
previousMonthLabel="Go to previous month"
nextMonthLabel="Go to next month"
selectionConfiguration={{
type: 'range',
startDate: new Date(2020, 3, 19),
endDate: new Date(2020, 3, 25),
}}
/>
);

const RangeDateCalendarExampleRTL = () => (
<div style={{ direction: 'rtl' }}>
<CalendarContainer
minDate={new Date(2020, 3, 1)}
id="myCalendar"
Expand All @@ -318,8 +337,6 @@ const RangeDateCalendarExample = (isRTL = false) => (
</div>
);

const RangeDateCalendarExampleRTL = () => RangeDateCalendarExample(true);

export {
DefaultExample,
CalendarNavExample,
Expand Down

0 comments on commit e1a6c96

Please sign in to comment.