Class: UI::DrawerCloseComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::DrawerCloseComponent
- Includes:
- DrawerCloseBehavior
- Defined in:
- app/view_components/ui/drawer_close_component.rb
Overview
Drawer close component (ViewComponent) Close button for drawer
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(variant: :outline, size: :default, classes: "", attributes: {}) ⇒ DrawerCloseComponent
constructor
A new instance of DrawerCloseComponent.
Methods included from DrawerCloseBehavior
Constructor Details
#initialize(variant: :outline, size: :default, classes: "", attributes: {}) ⇒ DrawerCloseComponent
Returns a new instance of DrawerCloseComponent.
18 19 20 21 22 23 |
# File 'app/view_components/ui/drawer_close_component.rb', line 18 def initialize(variant: :outline, size: :default, classes: "", attributes: {}) @variant = variant @size = size @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'app/view_components/ui/drawer_close_component.rb', line 25 def call render UI::ButtonComponent.new( variant: @variant, size: @size, classes: @classes, **drawer_close_data_attributes.merge(@attributes) ) do content end end |