Class: Matestack::Ui::Bootstrap::Components::Close
- Inherits:
-
Component
- Object
- Component
- Matestack::Ui::Bootstrap::Components::Close
- Defined in:
- app/concepts/matestack/ui/bootstrap/components/close.rb
Instance Method Summary collapse
Instance Method Details
#close_attributes ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'app/concepts/matestack/ui/bootstrap/components/close.rb', line 14 def close_attributes html_attributes.merge( class: close_classes, data: { "bs-dismiss": "#{dismiss}" }, type: 'button', attributes: (attributes || {}).merge({ 'aria-label': 'Close' }) ) end |
#close_classes ⇒ Object
23 24 25 26 27 28 |
# File 'app/concepts/matestack/ui/bootstrap/components/close.rb', line 23 def close_classes [].tap do |classes| classes << 'btn-close' classes << bs_class end.join(' ').strip end |
#response ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/concepts/matestack/ui/bootstrap/components/close.rb', line 6 def response close_attributes do span attributes: { 'aria-hidden': 'true' } do # plain "×".html_safe end end end |