Sha256: 1a4df097885a6c0f972712362beb3af0f87f4bc5bf7fc8e05ccbba74027dc24b
Contents?: true
Size: 580 Bytes
Versions: 21
Compression:
Stored size: 580 Bytes
Contents
# frozen_string_literal: true class Proscenium::ViewComponent::ReactComponent < Proscenium::ViewComponent attr_accessor :props, :lazy # @param props: [Hash] # @param lazy: [Boolean] Lazy load the component using IntersectionObserver. Default: true. def initialize(props: {}, lazy: true) @props = props @lazy = lazy super end def call tag.div class: ['componentManagedByProscenium', css_module(:component)], data: { component: { path: virtual_path, props: props, lazy: lazy } } do tag.div content || 'loading...' end end end
Version data entries
21 entries across 21 versions & 1 rubygems