|
1 | | -import { action } from "@storybook/addon-actions"; |
| 1 | +//import { action } from "@storybook/addon-actions"; |
2 | 2 |
|
3 | 3 | import BasicDropZoneView from "./views/BasicDropzoneView.svelte"; |
| 4 | +import BasicDropZoneViewSource from "./views/BasicDropzoneView.svelte?raw"; |
4 | 5 | import DisabledDropzoneView from "./views/DisabledDropzoneView.svelte"; |
| 6 | +import DisabledDropzoneViewSource from "./views/DisabledDropzoneView.svelte?raw"; |
5 | 7 | import CustomSlotDropzoneView from "./views/CustomSlotDropzoneView.svelte"; |
| 8 | +import CustomSlotDropzoneViewSource from "./views/CustomSlotDropzoneView.svelte?raw"; |
6 | 9 | import NoClickDropZoneView from "./views/NoClickDropzoneView.svelte"; |
| 10 | +import NoClickDropZoneViewSource from "./views/NoClickDropzoneView.svelte?raw"; |
7 | 11 | import NoDragDropzoneView from "./views/NoDragDropzoneView.svelte"; |
| 12 | +import NoDragDropzoneViewSource from "./views/NoDragDropzoneView.svelte?raw"; |
8 | 13 |
|
9 | | -import intro from "./../README.md"; |
| 14 | +import { sourceParameters } from "./helpers"; |
10 | 15 |
|
11 | 16 | export default { |
12 | 17 | title: "Examples", |
13 | | - parameters: { |
14 | | - notes: { Introduction: intro }, |
15 | | - }, |
| 18 | + component: null, |
16 | 19 | }; |
17 | 20 |
|
18 | | -export const BasicDropzone = () => ({ |
19 | | - Component: BasicDropZoneView, |
20 | | - props: {}, |
21 | | -}); |
22 | | - |
23 | | -export const DisabledDropzone = () => ({ |
24 | | - Component: DisabledDropzoneView, |
25 | | - props: {}, |
26 | | -}); |
27 | | - |
28 | | -export const CustomSlotDropzone = () => ({ |
29 | | - Component: CustomSlotDropzoneView, |
30 | | - props: {}, |
31 | | -}); |
32 | | - |
33 | | -export const DropZoneWithClickDisabled = () => ({ |
34 | | - Component: NoClickDropZoneView, |
35 | | - props: {}, |
36 | | -}); |
37 | | - |
38 | | -export const DropZoneWithDragDisabled = () => ({ |
39 | | - Component: NoDragDropzoneView, |
40 | | - props: {}, |
41 | | -}); |
| 21 | +export const BasicDropzone = { |
| 22 | + ...sourceParameters(BasicDropZoneViewSource), |
| 23 | + render: () => ({ |
| 24 | + Component: BasicDropZoneView, |
| 25 | + }), |
| 26 | +}; |
| 27 | + |
| 28 | +export const DisabledDropzone = { |
| 29 | + ...sourceParameters(DisabledDropzoneViewSource), |
| 30 | + render: () => ({ |
| 31 | + Component: DisabledDropzoneView, |
| 32 | + }), |
| 33 | +}; |
| 34 | + |
| 35 | +export const CustomSlotDropzone = { |
| 36 | + ...sourceParameters(CustomSlotDropzoneViewSource), |
| 37 | + render: () => ({ |
| 38 | + Component: CustomSlotDropzoneView, |
| 39 | + }), |
| 40 | +}; |
| 41 | + |
| 42 | +export const DropZoneWithClickDisabled = { |
| 43 | + ...sourceParameters(NoClickDropZoneViewSource), |
| 44 | + render: () => ({ |
| 45 | + Component: NoClickDropZoneView, |
| 46 | + }), |
| 47 | +}; |
| 48 | + |
| 49 | +export const DropZoneWithDragDisabled = { |
| 50 | + ...sourceParameters(NoDragDropzoneViewSource), |
| 51 | + render: () => ({ |
| 52 | + Component: NoDragDropzoneView, |
| 53 | + }), |
| 54 | +}; |
0 commit comments