Module: MountPoint::Generators

Defined in:
lib/mount_point/generators.rb

Instance Method Summary collapse

Instance Method Details

#mount_point(component_name, props: {}, as: :div) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/mount_point/generators.rb', line 7

def mount_point(component_name, props: {}, as: :div)
  (
    as,
    '',
    'id' => "#{component_name}_mount_point",
    'data-props' => props.to_json
  )
end