Sha256: 41a0bf68aa3afffbf9efa93fdfd9f5a4379b9d025c34121b64e24f75bfcbe49b
Contents?: true
Size: 395 Bytes
Versions: 29
Compression:
Stored size: 395 Bytes
Contents
module Lookbook class Icon::Component < Lookbook::BaseComponent def initialize(name:, size: 4, **html_attrs) @alpine_data = name.is_a?(Symbol) ? alpine_encode(name.to_s.tr("_", "-")) : name @size = size || 4 super(**html_attrs) end def size_rems "#{@size * 0.25}rem" end protected def alpine_component "iconComponent" end end end
Version data entries
29 entries across 29 versions & 1 rubygems