Skip to content

Commit

Permalink
Merge pull request #2168 from alphagov/button-links-content
Browse files Browse the repository at this point in the history
Update cookie macros about links styled as buttons
  • Loading branch information
EoinShaughnessy authored Mar 16, 2021
2 parents f023e60 + f30239c commit c4fbe3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@

## New features

- [#2164: Enable cookie banner to set link styled as a button](https://github.com/alphagov/govuk-frontend/pull/2164)
#### Allow users to use cookie banner buttons as links

You can now add links styled as buttons to cookie banners.

Use this feature only if you need to. For example, you can set the **Hide** button to be a link styled as a button that reloads the page. You might want to do this if the cookie banner needs to work without JavaScript and the **Hide** button does not need to set a cookie, as the user has already accepted or rejected cookies.

This was added in [pull request #2164: Enable cookie banner to set link styled as a button](https://github.com/alphagov/govuk-frontend/pull/2164)

### Fixes

Expand Down
4 changes: 2 additions & 2 deletions src/govuk/components/cookie-banner/cookie-banner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ params:
- name: type
type: string
required: false
description: The type of button. Does not apply if you set `href`, which renders a link. You can choose `button` or `submit`.
description: The type of button. You can set `button` or `submit`. Set `button` and `href` to render a link styled as a button. If you set `href`, it overrides `submit`.
- name: href
type: string
required: false
description: The `href` for a link. If you set `href`, users will see a link instead of a button.
description: The `href` for a link. Set `button` and `href` to render a link styled as a button.
- name: name
type: string
required: false
Expand Down

0 comments on commit c4fbe3d

Please sign in to comment.