-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add guidance for secondary and destructive buttons
Co-authored-by: Tim Paul <contact@timpaul.co.uk> Co-authored-by: amyhupe <amy.hupe@digital.cabinet-office.gov.uk>
- Loading branch information
Showing
7 changed files
with
120 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: Link button | ||
layout: layout-example.njk | ||
--- | ||
{% from "button/macro.njk" import govukButton %} | ||
|
||
{{ govukButton({ | ||
text: "Cancel", | ||
classes: "govuk-button--link" | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: Quiet primary button | ||
layout: layout-example.njk | ||
--- | ||
{% from "button/macro.njk" import govukButton %} | ||
|
||
{{ govukButton({ | ||
text: "Copy link", | ||
classes: "govuk-button--alt" | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: Secondary button combo | ||
layout: layout-example.njk | ||
--- | ||
{% from "button/macro.njk" import govukButton %} | ||
|
||
{{ govukButton({ | ||
text: "Save and continue", | ||
classes: "govuk-!-margin-right-1" | ||
}) }} | ||
|
||
{{ govukButton({ | ||
text: "Save as draft", | ||
classes: "govuk-button--secondary" | ||
}) }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: Secondary button | ||
layout: layout-example.njk | ||
--- | ||
{% from "button/macro.njk" import govukButton %} | ||
|
||
{{ govukButton({ | ||
text: "Find address", | ||
classes: "govuk-button--secondary" | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: Stacking buttons example | ||
layout: layout-example.njk | ||
--- | ||
{% from "button/macro.njk" import govukButton %} | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<h1 class="govuk-heading-l">Two-thirds column</h1> | ||
<p class="govuk-body">This is a paragraph inside a two-thirds wide column</p> | ||
</div> | ||
<div class="govuk-grid-column-one-third"> | ||
{{ govukButton({ | ||
text: "Publish", | ||
classes: "govuk-!-width-full govuk-!-margin-bottom-2" | ||
}) }} | ||
|
||
{{ govukButton({ | ||
text: "Preview", | ||
classes: "govuk-button--secondary govuk-!-width-full" | ||
}) }} | ||
|
||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: Warning button | ||
layout: layout-example.njk | ||
--- | ||
{% from "button/macro.njk" import govukButton %} | ||
|
||
{{ govukButton({ | ||
text: "Delete account", | ||
classes: "govuk-button--warning" | ||
}) }} |