class Ariadne::UI::Banner::Component
To ensure the Banner is also easily discoverable for assistive technology users, you must provide a heading inside of the Banner that describes the purpose of the Banner.
Banners are made visually prominent with icons and colors to immediately draw attention.
### Improve discoverability with a heading and landmark
@accessibility
|‘dismiss` |`CustomEvent<void>` |No |No |
|:———|:——————-|:——-|:———-|
|Name |Type |Bubbles |Cancelable |
### Events
Use this component to draw attention to important information.
def before_render
def before_render raise ArgumentError, "Requires `dismiss_label`" if dismissible && dismiss_label.nil? @header_id = self.class.generate_id end
def heroicon_or_default
def heroicon_or_default if heroicon? heroicon else icon = case scheme when :danger :"exclamation-circle" when :warning :"exclamation-triangle" when :info :"information-circle" when :success :"check-circle" else :"chat-bubble-bottom-center" end Ariadne::UI::Heroicon::Component.new(icon: icon, variant: :outline) end end
def icon
def icon heroicon || infer_icon end