Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Workshops
Developer workshop
Commits
1286f346
Commit
1286f346
authored
Feb 26, 2020
by
Jon Moore
Browse files
Adding in example storybook story
parent
31157880
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/app/features/exampleListing/components/ExampleCard.js
View file @
1286f346
...
@@ -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
>
...
...
src/app/features/exampleListing/components/ExampleListing.js
View file @
1286f346
...
@@ -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
>
...
...
src/app/features/exampleListing/stories/ExampleCard.stories.js
View file @
1286f346
...
@@ -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
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment