Class: PhlexKit::NativeSelectIcon
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::NativeSelectIcon
- Defined in:
- app/components/phlex_kit/native_select/native_select_icon.rb
Overview
The chevron that sits over the appearance:none
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ NativeSelectIcon
constructor
A new instance of NativeSelectIcon.
- #view_template(&block) ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ NativeSelectIcon
Returns a new instance of NativeSelectIcon.
7 8 9 |
# File 'app/components/phlex_kit/native_select/native_select_icon.rb', line 7 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template(&block) ⇒ Object
11 12 13 14 15 |
# File 'app/components/phlex_kit/native_select/native_select_icon.rb', line 11 def view_template(&block) span(**mix({ class: "pk-native-select-icon" }, @attrs)) do block ? yield : chevron end end |