Sha256: 217e2b7ad099ef3a8e2f4deb3a8c4e1d50274b92ef7f8b5e81afa42bcb36a49e
Contents?: true
Size: 566 Bytes
Versions: 5
Compression:
Stored size: 566 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
5 entries across 5 versions & 1 rubygems