Skip to content

Commit

Permalink
chore(#102): add subtitle to promo card, make date only display if pr…
Browse files Browse the repository at this point in the history
…ovided
  • Loading branch information
BrianGilbert committed Aug 16, 2023
1 parent fe4ccdd commit 0dac032
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/PromoCard.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Default.args = {
date: '29 Nov 2022',
default: 'Esse reprehenderit non sit occaecat eiusmod nulla cillum adipisicing excepteur anim non quis non dolor exercitation eu',
imageSrc: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=',
subtitle: 'Occaecat non enim',
tags: [
{ id: 1, value: 'Topic 1' },
{ id: 2, value: 'Topic 2' }
Expand Down
16 changes: 16 additions & 0 deletions src/components/PromoCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,20 @@
<slot name="content_top" />
</div>


<!-- Subtitle -->
<div
v-if="subtitle"
class="ct-promo-card__subtitle"
>
<span :class="'ct-tag ct-theme-'+ theme + ' ct-tag--tertiary'">
{{ subtitle }}
</span>
</div>

<!-- Date -->
<CTTag
v-if="date"
class="ct-promo-card__date"
icon="calendar-2"
:theme="theme"
Expand Down Expand Up @@ -120,6 +132,10 @@ export default {
type: String,
default: undefined
},
subtitle: {
type: String,
default: undefined,
},
summary: {
type: String,
default: undefined,
Expand Down

0 comments on commit 0dac032

Please sign in to comment.