Sha256: 099d675e07e235845b951a766b0c028e239cfcbdb4da8c496ff1ab8f1d4258cc
Contents?: true
Size: 532 Bytes
Versions: 15
Compression:
Stored size: 532 Bytes
Contents
# frozen_string_literal: true class ReactComponent < ApplicationComponent 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 end end end
Version data entries
15 entries across 15 versions & 1 rubygems