Skip to content

Commit

Permalink
Deprecate 'element' param on button
Browse files Browse the repository at this point in the history
  • Loading branch information
querkmachine committed Jan 15, 2024
1 parent 65b5f84 commit 0c7b49b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ This is an experimental change, based on our hypothesis that `govuk-font-size` a

This change was introduced in [pull request #4291: Rename `govuk-typography-responsive` to `govuk-font-size`](https://github.com/alphagov/govuk-frontend/pull/4291)

### Deprecated features

#### Stop using the `element` parameter on buttons

We have deprecated the `element` Nunjucks parameter and will remove it in the next major release.

In the future, the component will automatically use the use the `<a>` element if the `href` parameter is set, or the `<button>` element otherwise, without the ability to override it.

### Fixes

We've made fixes to GOV.UK Frontend in the following pull requests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ params:
- name: element
type: string
required: false
description: HTML element for the button component – `input`, `button` or `a`. In most cases you will not need to set this as it will be configured automatically if `href` is provided.
description: HTML element for the button component – `input`, `button` or `a`. In most cases you will not need to set this as it will be configured automatically if `href` is provided. This parameter will be removed in the next major version.
- name: text
type: string
required: true
Expand Down

0 comments on commit 0c7b49b

Please sign in to comment.