Skip to content

Commit

Permalink
Components: ExternalLink, add story (#18084)
Browse files Browse the repository at this point in the history
This update adds a story for the ExternalLink component.
Storybook knobs were added to better demonstrate the component's
properties.
  • Loading branch information
Jon Quach authored and gziolo committed Oct 28, 2019
1 parent a6e1252 commit 5a88ec3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/components/src/external-link/stories/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* External dependencies
*/
import { text } from '@storybook/addon-knobs';
/**
* Internal dependencies
*/
import ExternalLink from '../';

export default { title: 'ExternalLink', component: ExternalLink };

export const _default = () => {
const title = text( 'children', 'WordPress' );
const href = text( 'href', 'https://wordpress.org' );

return <ExternalLink href={ href }>{ title }</ExternalLink>;
};

0 comments on commit 5a88ec3

Please sign in to comment.