class Chamomile::Layout::Spinner
Public Class Methods
Source
# File lib/chamomile/layout/spinner.rb, line 6 def initialize(label: nil, color: "#7d56f4") @label = label @color = color @spinner = Chamomile::Spinner.new end
Public Instance Methods
Source
# File lib/chamomile/layout/spinner.rb, line 12 def render(width:, height:) view = @spinner.view view += " #{@label}" if @label Chamomile::Style.new.foreground(@color).render(view) end