Class: Matestack::Ui::Bootstrap::Components::Close
Instance Method Summary
collapse
Methods included from Registry
#bs_accordion, #bs_alert, #bs_avatar, #bs_badge, #bs_breadcrumb, #bs_btn, #bs_btn_group, #bs_card, #bs_carousel, #bs_close, #bs_col, #bs_collapse, #bs_container, #bs_dropdown, #bs_figure, #bs_form_checkbox, #bs_form_input, #bs_form_radio, #bs_form_select, #bs_form_submit, #bs_form_switch, #bs_icon, #bs_list_group, #bs_modal, #bs_navbar, #bs_page_heading, #bs_pagination, #bs_popover, #bs_progress, #bs_row, #bs_scrollspy, #bs_section_card, #bs_sidebar, #bs_smart_collection, #bs_spinner, #bs_tab_nav, #bs_tab_nav_content, #bs_toast, #bs_tooltip
Instance Method Details
#close_attributes ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/matestack/ui/bootstrap/components/close.rb', line 16
def close_attributes
options.merge(
class: close_classes,
data: { "bs-dismiss": "#{context.dismiss}" },
type: 'button'
).merge((context.attributes || {}).merge({ 'aria-label': 'Close' }))
end
|
#close_classes ⇒ Object
24
25
26
27
28
29
|
# File 'lib/matestack/ui/bootstrap/components/close.rb', line 24
def close_classes
[].tap do |classes|
classes << 'btn-close'
classes << context.bs_class
end.join(' ').strip
end
|
#response ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/matestack/ui/bootstrap/components/close.rb', line 8
def response
button close_attributes do
span 'aria-hidden': 'true' do
end
end
end
|