Sha256: e3294c6efa28a04c825bd0b603a38e8e0f1c8da266990e34dfa913a929ec0064
Contents?: true
Size: 447 Bytes
Versions: 40
Compression:
Stored size: 447 Bytes
Contents
module Lookbook class InspectorPanel::Component < Lookbook::BaseComponent attr_reader :panel_styles, :panel_html def initialize(name:, **attrs) @name = name super(**attrs) end def id Utils.id("panel", @name) end def before_render styles, html = StylesExtractor.call(content) @panel_styles = styles.map { |s| "##{id} #{s}" }.join("\n") @panel_html = html.html_safe end end end
Version data entries
40 entries across 40 versions & 1 rubygems