Skip to content

Commit

Permalink
Merge pull request #513 from appearhere/district-card-subtitle-optional
Browse files Browse the repository at this point in the history
Make district card subtitles optional
  • Loading branch information
jamero102 authored Feb 10, 2020
2 parents d520c3d + 05f294d commit 61bf110
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Card from "../Card/Card";

type Props = {
title: string,
subtitle: string,
subtitle?: string,
src: string,
alt: string,
href: string,
Expand All @@ -24,7 +24,7 @@ const DistrictCard = (props: Props) => {

<div className={css.content}>
<h3 className={css.title}>{title}</h3>
<p className={css.subtitle}>{subtitle}</p>
{ subtitle && <p className={css.subtitle}>{subtitle}</p> }
</div>
</Card>
);
Expand Down
8 changes: 8 additions & 0 deletions packages/playground/stories/Cards.story.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ storiesOf('Cards', module)
href="#"
/>
))
.add('District Card without subtitle', () => (
<DistrictCard
title="Covent Garden"
src="https://picsum.photos/500"
alt="hello"
href="#"
/>
))
.add('PictureCard', () => (
<PictureCard style={{ minHeight: '10vh' }} src="https://source.unsplash.com/random">
Hello, world
Expand Down

1 comment on commit 61bf110

@vercel
Copy link

@vercel vercel bot commented on 61bf110 Feb 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.