Skip to content

Commit

Permalink
Merge pull request #4480 from alphagov/change-button-type-in-copy-to-…
Browse files Browse the repository at this point in the history
…clipboard

Use correct button type for copy to clipboard component
  • Loading branch information
ryanb-gds authored Dec 6, 2024
2 parents a61847b + ba1a8d1 commit 2197104
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
## Unreleased

* Use component wrapper on reorderable list component ([PR #4474](https://github.com/alphagov/govuk_publishing_components/pull/4474))
* Use "button" button type for copy to clipboard component ([PR 4480](https://github.com/alphagov/govuk_publishing_components/pull/4480))

## 46.2.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

<%= render "govuk_publishing_components/components/button", {
text: button_text,
type: "button",
data_attributes: button_data_attributes,
secondary_quiet: true,
} %>
Expand Down
2 changes: 1 addition & 1 deletion spec/components/copy_to_clipboard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ def component_name

assert_select "label", text: "Some label"
assert_select "input", value: "https://www.example.org"
assert_select "button", value: "Copy link"
assert_select "button[type=\"button\"]", value: "Copy link"
end
end

0 comments on commit 2197104

Please sign in to comment.