Skip to content

Commit

Permalink
add card link example with description
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhunter08 committed May 1, 2024
1 parent 121c9b5 commit 95a87e7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/components/card-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ On pages deeper in the structure of the NHS App, users may need more details to

Only use this variation if you have found a user need for more detailed links on a particular page. A form of this variation is currently used on the “Messages” hub to explain different inboxes to users.

[embed paragraph text example]
{% example "cards/card-link-with-description.njk" %}

### Using icons

Expand Down
14 changes: 14 additions & 0 deletions docs/examples/cards/card-link-with-description.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: layouts/example.njk
title: Card link with description
figmaLink: "https://www.figma.com/file/6f2CbcZ7cnpNrtKEcfQp8X/NHS-App-Design-System?type=design&node-id=128%3A7303&mode=design&t=DLiyCHcTTAYkEDa0-1"
vueLink: "https://nhsappvuecomponentlibraryv1.nonlive.nhsapp.service.nhs.uk/?path=/docs/components-nhscardlink--docs"
---

{% from "card/macro.njk" import card %}

{{ card({
title: 'Your approved prescriptions',
href: '#',
description: 'View prescriptions ready for pharmacy to prepare'
}) }}
2 changes: 1 addition & 1 deletion docs/examples/cards/card-link.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ vueLink: "https://nhsappvuecomponentlibraryv1.nonlive.nhsapp.service.nhs.uk/?pat
{% from "card/macro.njk" import card %}

{{ card({
title: 'Title',
title: 'Request repeat prescriptions',
href: '#'
}) }}
2 changes: 1 addition & 1 deletion src/components/card/card.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</a>
{%- if params.description -%}
<div class="nhsapp-card__below">
<p>{{ params.description }}</p>
<p class="nhsuk-u-margin-top-1">{{ params.description }}</p>
</div>
{%- endif -%}
</div>
Expand Down

0 comments on commit 95a87e7

Please sign in to comment.