Files
leadchat/app/javascript/dashboard/components/ui/stories/DateRangePicker.stories.js
Sivin Varghese a9ccded62b feat: Creates custom date range picker component (#2597)
* feat: Adds custom date range in reports

* error fixes

* Creates new component for date range and adds stories

* Revert files

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2021-07-09 14:16:55 +05:30

39 lines
853 B
JavaScript

import { action } from '@storybook/addon-actions';
import WootDateRangePicker from '../DateRangePicker';
export default {
title: 'Components/Date Picker/Date Range Picker',
argTypes: {
confirmText: {
defaultValue: 'Apply',
control: {
type: 'text',
},
},
placeholder: {
defaultValue: 'Select date range',
control: {
type: 'text',
},
},
value: {
control: {
type: 'text',
},
},
},
};
const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { WootDateRangePicker },
template:
'<woot-date-range-picker v-bind="$props" @change="onChange"></woot-date-range-picker>',
});
export const DateRangePicker = Template.bind({});
DateRangePicker.args = {
onChange: action('applied'),
value: [new Date(), new Date()],
};