Sha256: 0b92e06a35a0a439c7374fa7f719b065b5f0c5f6455ac96add1d7ab4905cc311
Contents?: true
Size: 565 Bytes
Versions: 13
Compression:
Stored size: 565 Bytes
Contents
module Lookbook class Viewport::Component < Lookbook::BaseComponent def initialize(src:, resize_height: true, resize_width: true, max_height: nil, iframe_id: nil, **html_attrs) @src = src @resize_height = resize_height @resize_width = resize_width @max_height = max_height @iframe_id = iframe_id super(**html_attrs) end def generate_id(*args) args.map { |args| args.delete_prefix("/").tr("&?=/_-", "-") }.join("-") end protected def alpine_component "viewportComponent" end end end
Version data entries
13 entries across 13 versions & 1 rubygems