Sha256: 0b78a32f79ac8022176a7311f5650114cc5ce52d6a28aad4a70f3a0e111b57bd
Contents?: true
Size: 383 Bytes
Versions: 2
Compression:
Stored size: 383 Bytes
Contents
# frozen_string_literal: true class Scarpe class Fill < Scarpe::Widget display_properties :color def initialize(color) @color = color super create_display_widget end def element HTML.render do |h| h.style(<<~CSS) ##{html_id} { background-color: #{@color}; } CSS end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
scarpe-0.2.1 | lib/scarpe/fill.rb |
scarpe-0.2.0 | lib/scarpe/fill.rb |