Class: Matestack::Ui::Bootstrap::Components::Icon
- Inherits:
-
BaseComponent
- Object
- Component
- BaseComponent
- Matestack::Ui::Bootstrap::Components::Icon
- Defined in:
- lib/matestack/ui/bootstrap/components/icon.rb
Instance Method Summary collapse
Instance Method Details
#get_size ⇒ Object
15 16 17 |
# File 'lib/matestack/ui/bootstrap/components/icon.rb', line 15 def get_size context.size || 20 end |
#response ⇒ Object
9 10 11 12 13 |
# File 'lib/matestack/ui/bootstrap/components/icon.rb', line 9 def response svg class: "bi #{context.bs_class}", width: get_size, height: get_size, fill: 'currentColor' do unescape("<use xlink:href='#{asset_path("icons/bootstrap-icons.svg")}##{context.name}'/>") end end |