Sha256: 2584111abbfd4db22e12cf364d6c8e5c54033a4fef30bdfc18fb8db18a68a304
Contents?: true
Size: 616 Bytes
Versions: 2
Compression:
Stored size: 616 Bytes
Contents
# frozen_string_literal: true class FoxTail::SpinnerComponent < FoxTail::InlineSvgComponent has_option :color, default: :default has_option :size, default: :base def initialize(html_attributes = {}) path = html_attributes.delete(:path) { self.class.spinner_path } super(path, html_attributes) end def before_render super html_attributes[:"aria-hidden"] = true html_attributes[:role] = :status end def html_class classnames theme.apply(:root, self), super end class << self def spinner_path FoxTail.root.join "app/assets/vendor/spinner.svg" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fox_tail-0.2.1 | app/components/fox_tail/spinner_component.rb |
fox_tail-0.2.0 | app/components/fox_tail/spinner_component.rb |