Sha256: 999ff5bec9072513b329445a1b9d93c2bd109d6c5fc3dbe1492d36a9c6faa27c
Contents?: true
Size: 699 Bytes
Versions: 8
Compression:
Stored size: 699 Bytes
Contents
module Lookbook class Embed::Component < Lookbook::BaseComponent def initialize(id:, example:, params: {}, opts: {}, max_height: nil, **html_attrs) @id = id @example = example @params = params @opts = opts @max_height = max_height super(**html_attrs) end protected def lookbook_inspect_path(*args) Lookbook::Engine.routes.url_helpers.lookbook_inspect_path(*args) end def lookbook_preview_path(*args) Lookbook::Engine.routes.url_helpers.lookbook_preview_path(*args) end def alpine_data [@id.to_json, "$store.pages.embeds"].join(",") end def alpine_component "embedComponent" end end end
Version data entries
8 entries across 8 versions & 1 rubygems