Skip to content

Commit

Permalink
ViewPort Support Added
Browse files Browse the repository at this point in the history
  • Loading branch information
Aman035 committed Sep 14, 2021
1 parent 709a1da commit 20b69b7
Show file tree
Hide file tree
Showing 4 changed files with 450 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
stories: ['../src/**/*.stories.@(tsx|jsx|js)'],
addons: ['@storybook/addon-actions'],
addons: ['@storybook/addon-actions','@storybook/addon-viewport'],
};
8 changes: 8 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import { configure, addDecorator } from '@storybook/react';
import Container from '../src/components/container';
import {INITIAL_VIEWPORTS} from '@storybook/addon-viewport';
import { addParameters } from '@storybook/react'

addDecorator((story) => <Container>{story()}</Container>);

Expand All @@ -9,4 +11,10 @@ function loadStories() {
context.keys().forEach(context);
}

addParameters({
viewport: {
viewports: INITIAL_VIEWPORTS,
}
})

configure(loadStories, module);
Loading

0 comments on commit 20b69b7

Please sign in to comment.