You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In practice, callouts can be dismissed or closed. The current docs demonstrate the use of a 'Dismiss' button below the copy and, in Kibana, we see the use of a close button in the upper-right corner (see below).
Describe the solution you'd like
It is possible for implementors to attain this layout/functionality, but it is not provided out of the box. A recent question was raised with the EUI team on how to do this, and the team felt it was worthwhile to 'pave the cowpath' and add an optional close button as opposed to leaving it up to a documented pattern.
Describe alternatives you've considered
Leaving it up to a documented pattern.
Additional context
With a fresh deployment (or by clearing localStorage) you can see the above example in Discover, as an example.
In a constructive way, this walks the line of being either just-enough or too opinionated. Conservatively, I start with the latter, but I can't think of a situation where you wouldn't want to have both. Going the route of showing both, I am leaning toward the last option (the default button style) for the Dismiss button when it is the only CTA; else use the empty style.
Following discussions related to the work in #7156, we decided to provide an isDismissible prop, which when true renders a close icon to the top right.
@ryankeairns, we could add guidelines on how to render the Dismiss button (secondary vsempty) and leave the implementation details to the teams.
Activity
kyrspl commentedon Aug 14, 2023
@ryankeairns, my thoughts below:
Dismissible prop
We could add a
dismissible: boolprop, which adds theDismissbutton as well as a close icon (top right).:: CTA
When

Dismissis the only option, should the button be aprimary,secondaryortertiaryaction?:: Text
Should we fix the text to
Dismiss?:: Other, similar requests
Another request that has come in other areas of product (namely Userconsole) is a
Don't show againaction.ryankeairns commentedon Aug 14, 2023
Thanks for noodling on this @kyrspl
In a constructive way, this walks the line of being either just-enough or too opinionated. Conservatively, I start with the latter, but I can't think of a situation where you wouldn't want to have both. Going the route of showing both, I am leaning toward the last option (the default button style) for the Dismiss button when it is the only CTA; else use the empty style.
kyrspl commentedon Sep 6, 2023
Following discussions related to the work in #7156, we decided to provide an
isDismissibleprop, which whentruerenders a close icon to the top right.@ryankeairns, we could add guidelines on how to render the
Dismissbutton (secondaryvsempty) and leave the implementation details to the teams.