-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduces the data_attributes required for `ga4-auto-tracker` to only the flash alert component. This has been achieved by: 1. Passing `data_attributes` to `flash_message_component.html.erb`. 2. Adding a `data_attributes` property to `Admin::FlashMessageComponent` (so it is available to all extending components). 3. Populating `data_attributes` in `Admin::FlashAlertComponent` with required properties.
- Loading branch information
Showing
3 changed files
with
18 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
<%= | ||
content_tag(:div) do | ||
render "govuk_publishing_components/components/#{component_name}", { message: } | ||
render "govuk_publishing_components/components/#{component_name}", { | ||
message: message, | ||
data_attributes: data_attributes, | ||
} | ||
end | ||
%> |
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 |
---|---|---|
|
@@ -11,4 +11,6 @@ def message | |
@message | ||
end | ||
end | ||
|
||
def data_attributes; end | ||
end |