Sha256: bf932afbfb68765e7c50633e68f5fb7c772f7eeb7692c0a17d0fe8ab46cc0a79
Contents?: true
Size: 434 Bytes
Versions: 54
Compression:
Stored size: 434 Bytes
Contents
module Coco class ModalLightbox < Coco::Component include Concerns::AcceptsOptions renders_one :image, ->(scroll_top: 0, **kwargs) do coco_image( x: {"on:load": "imageLoaded"}, data: {scroll_top: scroll_top.to_i, role: "image"}, **kwargs ) end before_render do unless image? raise ArgumentError, "An image is required for the lightbox" end end end end
Version data entries
54 entries across 54 versions & 1 rubygems