Migrate to Pajamas::AlertComponent ViewComponent in app/views/shared/hook_logs/_content.html.haml
Update app/views/shared/hook_logs/_content.html.haml
to leverage the Pajamas::AlertComponent
ViewComponent.
Refer to the epic for detailed migration instructions.
-
The alert is rendered with render Pajamas::AlertComponent.new
. -
The alert's body is placed in the component's block and wrapped in a .gl-alert-body
selector. -
If the alert has actions, they are rendered in the component's block, below the body, and wrapped in a .gl-alert-actions
selector.-
If there are multiple action buttons, they are separated with a .gl-ml-3
margin or equivalent.
-
-
If the alert has a title, it is set via the title
parameter. -
The alert's variant is set via the variant
parameter (can be omitted for info alerts). -
If the alert is non-dismissible, the dismissible
parameter is set tofalse
. -
Alert's classes are set via the alert_class
parameter. -
Alert's data attributes are set via the alert_data
parameter. -
Alert's dismiss button's classes are set via the close_button_class
parameter. -
Alert's dismiss button's data attributes are set via the close_button_data
parameter.
Edited by Paul Gascou-Vaillancourt