Skip to content

Commit

Permalink
refactor(story): update to modern storybook syntax
Browse files Browse the repository at this point in the history
Storybook team is advising developers to migrate away from storiesOf API, as per this doc: https://github.com/storybookjs/storybook/blob/next/lib/core/docs/storiesOf.md. 

This commit upgrades the stories template to this modern syntax.
  • Loading branch information
wbhob committed Jul 30, 2021
1 parent 6e82ee8 commit 6b32c30
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/templates/component/componentStoryTemplate.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module.exports = `/* eslint-disable */
import React from 'react';
import { storiesOf } from '@storybook/react';
import TemplateName from './TemplateName';
storiesOf('TemplateName', module).add('default', () => <TemplateName />);
export default {
title: "TemplateName",
component: TemplateName,
};
export const Template = TemplateName.bind({});
Template.args = {};
`;

0 comments on commit 6b32c30

Please sign in to comment.