import React from 'react'; import { ComponentMeta, ComponentStory } from '@storybook/react'; import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'; import Container from './Container'; export default { // Title inside navigation bar title: 'Container', // Component to test component: Container, // Clarifying the way how to process specific // properties of your component and which values // it can accept. } as ComponentMeta; /** * This is a way to define a tempalte for your component. * * This template should cover all the states. * * In most cases you should just distruct args attribute * on a returning component. */ const Template: ComponentStory = (args) => (
simple
); // /* -------------------------------------------------------------------------- */ /* States of your component */ /* -------------------------------------------------------------------------- */ export const Desktop: ComponentStory = Template.bind({}); Desktop.parameters = { viewport: { defaultViewport: 'desktop', styles: { height: '568px', width: '320px', }, }, }