Skip to content

Instantly share code, notes, and snippets.

@lencioni
Last active May 18, 2017 20:57
Show Gist options
  • Select an option

  • Save lencioni/d5002bdd8a18f466d8d6d77d5c8f8754 to your computer and use it in GitHub Desktop.

Select an option

Save lencioni/d5002bdd8a18f466d8d6d77d5c8f8754 to your computer and use it in GitHub Desktop.
Button example file
import React from 'react';
export default ({ Button }, { action, fixtures }) => ({
// Optional property that can be used to mark related components in Storybook
tags: ['tag1', 'tag2'],
// Optional property for some Markdown that will show up in the Usage tab in
// Storybook
usage: `
Button documentation in Markdown.
`,
examples: [
{
// Required property that defines this example's Storybook story name and
// Happo test description
description: 'default',
// Required property that defines the JSX code rendered for this example's
// Storybook story and Happo test.
render() {
return <Button />;
},
},
{
description: 'primary',
render() {
return <Button primary />;
},
},
{
description: 'as a link',
render() {
return <Button href="/" />;
},
},
],
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment