Sha256: 0a6cab38b1e68bdfda34a1c7c14db658217bd1a43f7f7521619c1c460a4c4b62
Contents?: true
Size: 414 Bytes
Versions: 48
Compression:
Stored size: 414 Bytes
Contents
module Lookbook class PageTabs::Component < Lookbook::BaseComponent renders_many :tabs, ->(**attrs, &block) do @tabs ||= [] attrs[:tab_content] = capture(&block) attrs[:markdown] ||= @markdown @tabs << attrs end def initialize(markdown: true, **html_attrs) @markdown = markdown super(**html_attrs) end def before_render tabs.size end end end
Version data entries
48 entries across 48 versions & 1 rubygems