Sha256: e0a0b5a16ad22cdf821c0f842299db013171adf873c0b1147cb05cf240ccafed
Contents?: true
Size: 482 Bytes
Versions: 4
Compression:
Stored size: 482 Bytes
Contents
module Lookbook class Prose::Component < Lookbook::BaseComponent def initialize(size: :md, markdown: true, **html_attrs) @size = size @markdown = markdown super(**html_attrs) end def rendered_content @markdown ? MarkdownRenderer.call(content.strip_heredoc) : helpers.raw(content) end def size_class case @size when :sm "prose-sm" when :lg "prose-lg" else "" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems