40 lines
965 B
TypeScript
40 lines
965 B
TypeScript
import React from 'react';
|
|
|
|
import { Meta, Story } from '@storybook/react';
|
|
|
|
import Calendar, { CalendarType } from '@treejs/components/Calendar';
|
|
import { CALENDAR_VIEW } from '@treejs/components/Calendar/types';
|
|
|
|
import CalendarTimeColumn from './CalendarTimeColumn';
|
|
import { CustomDayInMonth } from './CustomDayInMonth';
|
|
import { CustomDayInWeek } from './CustomDayInWeek';
|
|
|
|
const Template: Story<CalendarType> = (args) => <Calendar {...args} />;
|
|
|
|
export const Mini = Template.bind({});
|
|
Mini.args = {
|
|
title: 'Mini calendar',
|
|
hover: true,
|
|
};
|
|
|
|
export const Month = Template.bind({});
|
|
Month.args = {
|
|
title: 'Month calendar',
|
|
detail: CustomDayInMonth,
|
|
type: CALENDAR_VIEW.MONTH,
|
|
hover: true,
|
|
};
|
|
|
|
export const Week = Template.bind({});
|
|
Week.args = {
|
|
title: 'Week calendar',
|
|
detail: CustomDayInWeek,
|
|
timeColumn: CalendarTimeColumn,
|
|
type: CALENDAR_VIEW.WEEK,
|
|
hover: true,
|
|
};
|
|
|
|
export default {
|
|
title: 'Components/Calendar',
|
|
component: Calendar,
|
|
} as Meta;
|