2021-07-09 08:46:55 +00:00
|
|
|
import { action } from '@storybook/addon-actions';
|
2021-07-15 08:01:43 +00:00
|
|
|
import WootDateRangePicker from '../DateRangePicker.vue';
|
2021-07-09 08:46:55 +00:00
|
|
|
|
|
|
|
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'),
|
2021-07-15 08:01:43 +00:00
|
|
|
value: new Date(),
|
2021-07-09 08:46:55 +00:00
|
|
|
};
|