Class: LocoMotion::BasicComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
lib/loco_motion/basic_component.rb

Overview

The BasicComponent class is used for all slots that don’t provide a component so that users can pass in all of the same CSS and HTML options that a standard component would have.

Constant Summary

Constants inherited from BaseComponent

LocoMotion::BaseComponent::EMPTY_PART_IGNORED_TAGS, LocoMotion::BaseComponent::SELF_CLOSING_TAGS

Instance Attribute Summary

Attributes inherited from BaseComponent

#config, #loco_parent

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseComponent

#before_render, build, #component_ref, #config_option, #cssify, define_modifier, define_modifiers, define_part, define_parts, define_size, define_sizes, #empty_part_content, #initialize, #inspect, #part, register_component_initializer, register_component_setup, #rendered_css, #rendered_data, #rendered_html, #rendered_stimulus_controllers, #rendered_tag_name, renders_many, renders_one, set_component_name, #set_loco_parent, #strip_spaces

Constructor Details

This class inherits a constructor from LocoMotion::BaseComponent

Class Method Details

.nameObject



14
15
16
# File 'lib/loco_motion/basic_component.rb', line 14

def self.name
  "BasicComponent"
end

Instance Method Details

#callObject



8
9
10
11
12
# File 'lib/loco_motion/basic_component.rb', line 8

def call
  part(:component) do
    content
  end
end