How to use @storybook/addon-links - 10 common examples

To help you get started, we’ve selected a few @storybook/addon-links examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flow-typed / flow-typed / definitions / npm / @storybook / addon-links_v3.x.x / test_addon-links_v3.x.x.js View on Github external
it('should error on invalid args', () => {
    // $ExpectError
    hrefTo();

    // $ExpectError
    hrefTo({});

    // $ExpectError
    hrefTo(true, true);
  });
github storybookjs / storybook / lib / cli / generators / MITHRIL / template / stories / Welcome.js View on Github external
updateHref: async vnode => {
    const href = await hrefTo(vnode.attrs.kind, vnode.attrs.story);
    // eslint-disable-next-line no-param-reassign
    vnode.state.href = href;
    m.redraw();
  },
  view: vnode => (
github flow-typed / flow-typed / definitions / npm / @storybook / addon-links_v3.x.x / test_addon-links_v3.x.x.js View on Github external
it('returns a Promised string', () => {
    hrefTo('', '').then(result => (result: string));
  });
github syl20lego / rn-skeleton / test / stories / welcome.stories.js View on Github external
storiesOf('Welcome', module).add('to Storybook', () => );
github rafaelrozon / react-storybook-console / stories / index.stories.js View on Github external
storiesOf('Welcome', module).add('to Storybook', () => );
github walmartlabs / concord / console / src / stories / index.js View on Github external
storiesOf('Welcome', module).add('to Storybook', () => );
github ReactBeerLille / storybook-talk / src / Components / Tabs / stories.js View on Github external
.add('With all tabs disabled', () => (
    
      
        <div label="Tab 1">
          
        </div>
        <div label="Tab 2">
          
        </div>
        <div label="Tab 3">
          
        </div>
      
      
        Okay, thanks!
      
    
  ));
github LeadcoinNetwork / Web-App-Project / frontend / src / storybook-examples / storybook.link.stories.js View on Github external
storiesOf("Example Stories/link", module).add("link", () =&gt; (
  <div>
    Click here to link to other story
  </div>
))
github storybookjs / storybook / examples / vue-kitchen-sink / src / stories / custom-rendering.stories.js View on Github external
export const templateMethods = () =&gt; ({
  components: { MyButton },
  template: `
      <p>
        <em>Clicking the button will navigate to another story using the 'addon-links'</em><br>
        MyButton rendered in a template + props &amp; methods
      </p>`,
  methods: {
    action: linkTo('Button'),
  },
});

@storybook/addon-links

Link stories together to build demos and prototypes with your UI components

MIT
Latest version published 1 day ago

Package Health Score

95 / 100
Full package analysis