Class: FoxTail::PasswordInputTriggerComponent
- Inherits:
-
TriggerBaseComponent
- Object
- ViewComponent::Base
- Base
- BaseComponent
- TriggerBaseComponent
- FoxTail::PasswordInputTriggerComponent
- Defined in:
- app/components/fox_tail/password_input_trigger_component.rb
Defined Under Namespace
Classes: StimulusController
Instance Attribute Summary
Attributes inherited from TriggerBaseComponent
Attributes inherited from BaseComponent
Instance Method Summary collapse
Methods inherited from TriggerBaseComponent
#block?, #call, #initialize, #render?
Methods inherited from BaseComponent
classname_merger, #initialize, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class
Methods inherited from Base
Constructor Details
This class inherits a constructor from FoxTail::TriggerBaseComponent
Instance Method Details
#before_render ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'app/components/fox_tail/password_input_trigger_component.rb', line 4 def before_render super html_attributes[:class] = classnames theme.apply("root/hidden", self), html_class html_attributes[:aria] ||= {} html_attributes[:aria][:controls] = selector.gsub(/^[#|.]/, "") html_attributes[:aria][:expanded] = false end |
#stimulus_controller_options ⇒ Object
13 14 15 16 |
# File 'app/components/fox_tail/password_input_trigger_component.rb', line 13 def super.merge hidden_classes: theme.apply("root/hidden", self), visible_classes: theme.apply("root/visible", self) end |