Class: Components::Icon
- Defined in:
- lib/backpack/components/icon.rb
Constant Summary
Constants included from Backpack::Attributes
Backpack::Attributes::HTMLAttribute, Backpack::Attributes::HTMLAttributes, Backpack::Attributes::MandatoryHTMLAttribute
Instance Method Summary collapse
Methods included from Backpack::Classes
Methods included from Backpack::Identifier
Instance Method Details
#view_template ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/backpack/components/icon.rb', line 13 def view_template add_to_sprite svg(**root_attributes) do |s| s.title { @label } if labelable? s.use('xlink:href': "#IconSprite-#{@key}") end end |