Class: Daisy::DataDisplay::AvatarComponent
- Inherits:
-
LocoMotion::BaseComponent
- Object
- ViewComponent::Base
- LocoMotion::BaseComponent
- Daisy::DataDisplay::AvatarComponent
- Includes:
- LocoMotion::Concerns::IconableComponent, LocoMotion::Concerns::LinkableComponent, LocoMotion::Concerns::TippableComponent
- Defined in:
- app/components/daisy/data_display/avatar_component.rb
Constant Summary
Constants inherited from LocoMotion::BaseComponent
LocoMotion::BaseComponent::EMPTY_PART_IGNORED_TAGS, LocoMotion::BaseComponent::SELF_CLOSING_TAGS
Instance Attribute Summary
Attributes inherited from LocoMotion::BaseComponent
Instance Method Summary collapse
- #before_render ⇒ Object
-
#initialize(**kws, &block) ⇒ AvatarComponent
constructor
Create a new avatar component.
Methods included from LocoMotion::Concerns::IconableComponent
#has_icons?, #left_icon_html, #render_left_icon, #render_right_icon, #right_icon_html
Methods inherited from LocoMotion::BaseComponent
build, #component_ref, #config_option, #cssify, define_modifier, define_modifiers, define_part, define_parts, define_size, define_sizes, #empty_part_content, #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
Methods included from LocoMotion::Concerns::InspectableComponent
Constructor Details
#initialize(**kws, &block) ⇒ AvatarComponent
Create a new avatar component.
75 76 77 78 79 80 |
# File 'app/components/daisy/data_display/avatar_component.rb', line 75 def initialize(**kws, &block) super @src = config_option(:src) @alt = config_option(:alt) end |
Instance Method Details
#before_render ⇒ Object
82 83 84 85 86 87 |
# File 'app/components/daisy/data_display/avatar_component.rb', line 82 def before_render # Run component setup *before* super to allow BaseComponent hooks to run last setup_component super end |