app/components/solidus_admin/ui/icon/component.rb in solidus_admin-0.0.2 vs app/components/solidus_admin/ui/icon/component.rb in solidus_admin-0.1.0
- old
+ new
@@ -14,9 +14,13 @@
@name = name
@attrs = attrs
# Hide the icon from screen readers by default.
@attrs['aria-hidden'] = true unless @attrs.key?('aria-hidden')
+
+ # Default icons without style to 16x16, mostly useful in test snapshots.
+ @attrs['width'] = '16'
+ @attrs['height'] = '16'
end
def call
href = "#{image_path('solidus_admin/remixicon.symbol.svg')}#ri-#{@name}"
tag.svg(tag.use("xlink:href": href), **@attrs)