Commit 1286f346 authored by Jon Moore's avatar Jon Moore
Browse files

Adding in example storybook story

parent 31157880
...@@ -8,11 +8,11 @@ const ExampleCard = ({ title, description, image, uri, className }) => { ...@@ -8,11 +8,11 @@ const ExampleCard = ({ title, description, image, uri, className }) => {
return ( return (
<ExampleCardStyled className={className}> <ExampleCardStyled className={className}>
<div className="cInner"> <div className="cInner">
<div className="cTitle">{title}</div> <div className="cTitle">
<Link to={uri} title={title}>
<Link to={uri} title={title}> {title}
{title} </Link>
</Link> </div>
<p>{description}</p> <p>{description}</p>
{image && <img src={image.asset.sys.uri} alt={image.altText} />} {image && <img src={image.asset.sys.uri} alt={image.altText} />}
</div> </div>
......
...@@ -50,8 +50,8 @@ const ExampleListing = ({ ...@@ -50,8 +50,8 @@ const ExampleListing = ({
<div key={idx} className="card"> <div key={idx} className="card">
<div className="cardPadding"> <div className="cardPadding">
<ExampleCard <ExampleCard
guid={entry.sys.id}
title={entry.entryTitle} title={entry.entryTitle}
description={entry.entryDescription}
uri={entry.sys && entry.sys.uri} uri={entry.sys && entry.sys.uri}
/> />
</div> </div>
......
...@@ -6,7 +6,13 @@ import ExampleCard from '~/features/exampleListing/components/ExampleCard'; ...@@ -6,7 +6,13 @@ import ExampleCard from '~/features/exampleListing/components/ExampleCard';
storiesOf('Features | Listings', module).add( storiesOf('Features | Listings', module).add(
'Example card', 'Example card',
() => { () => {
return <ExampleCard />; return (
<ExampleCard
title="Example title"
description="Example description"
uri="/example-content/example-article"
/>
);
}, },
{ {
knobs: { knobs: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment