diff --git a/src/components/Results.vue b/src/components/Results.vue index 71db849b8..27673e153 100644 --- a/src/components/Results.vue +++ b/src/components/Results.vue @@ -3,7 +3,7 @@ - + Result 'objectID': {{ result.objectID }} diff --git a/stories/Results.stories.js b/stories/Results.stories.js new file mode 100644 index 000000000..0f7690037 --- /dev/null +++ b/stories/Results.stories.js @@ -0,0 +1,38 @@ +import { previewWrapper } from './utils'; +import { storiesOf } from '@storybook/vue'; + +storiesOf('Results', module) + .addDecorator(previewWrapper) + .add('default', () => ({ + template: ` + + `, + })) + .add('header & footer', () => ({ + template: ` + +
--- Header ---
+
--- Footer ---
+
+ `, + })) + .add('with index', () => ({ + template: ` + +
+ {{index + 1}}. {{result.objectID}} +
+
+ `, + })) + .add('all slots', () => ({ + template: ` + +
--- Header ---
+
+ {{index + 1}}. {{result.objectID}} +
+
--- Footer ---
+
+ `, + }));