class Primer::Beta::CloseButton
[0]: primer.style/view-components/system-arguments#html-attributes<br>You may choose to override this label with something more descriptive via [system_arguments].
‘CloseButton` has a default `aria-label` of “Close” to provides assistive technologies with an accessible label.
@accessibility
Use `CloseButton` to render an `×` without default button styles.
def call
def call render(Primer::Beta::BaseButton.new(**@system_arguments)) do render(Primer::OcticonComponent.new("x")) end end
def initialize(type: DEFAULT_TYPE, **system_arguments)
-
system_arguments(Hash) -- <%= link_to_system_arguments_docs %> -
type(Symbol) -- <%= one_of(Primer::Beta::CloseButton::TYPE_OPTIONS) %>
Other tags:
- Example: Default -
def initialize(type: DEFAULT_TYPE, **system_arguments) @system_arguments = deny_tag_argument(**system_arguments) @system_arguments[:tag] = :button @system_arguments[:block] = false @system_arguments[:type] = fetch_or_fallback(TYPE_OPTIONS, type, DEFAULT_TYPE) @system_arguments[:classes] = class_names( "close-button", system_arguments[:classes] ) @system_arguments[:"aria-label"] ||= "Close" end