Skip to content

Provide option to trigger event on GlBanner button click

Issue

From the discussion gitlab!37658 (comment 40484599), currently the GlBanner takes props to allow adding a link for the Call to Action button component that gets rendered, but this does not cover scenarios where the action we want to perform is not simply navigating to a new url, for example triggering a modal window.

Additionally, if we have not already done so, we should migrate the GlDeprecatedButton

Possible solutions

  • The could be updated to emit a click event when the Call to action button is clicked, this would allow users to hook perform an action after the button click
  • We could convert the Call to Action to a <slot>, allowing the user to provide their own code in place of the Call to Action button.
Edited by Paul Gascou-Vaillancourt