Class: Maglev::Uikit::PageLayoutComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Maglev::Uikit::PageLayoutComponent
- Defined in:
- app/components/maglev/uikit/page_layout_component.rb
Defined Under Namespace
Classes: BackLinkComponent
Instance Attribute Summary collapse
-
#back_path ⇒ Object
readonly
Returns the value of attribute back_path.
-
#expanded ⇒ Object
readonly
Returns the value of attribute expanded.
Instance Method Summary collapse
-
#initialize(back_path: nil, expanded: false) ⇒ PageLayoutComponent
constructor
A new instance of PageLayoutComponent.
- #wrapper_classes ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(back_path: nil, expanded: false) ⇒ PageLayoutComponent
Returns a new instance of PageLayoutComponent.
15 16 17 18 |
# File 'app/components/maglev/uikit/page_layout_component.rb', line 15 def initialize(back_path: nil, expanded: false) @back_path = back_path @expanded = end |
Instance Attribute Details
#back_path ⇒ Object (readonly)
Returns the value of attribute back_path.
13 14 15 |
# File 'app/components/maglev/uikit/page_layout_component.rb', line 13 def back_path @back_path end |
#expanded ⇒ Object (readonly)
Returns the value of attribute expanded.
13 14 15 |
# File 'app/components/maglev/uikit/page_layout_component.rb', line 13 def @expanded end |
Instance Method Details
#wrapper_classes ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/components/maglev/uikit/page_layout_component.rb', line 20 def wrapper_classes class_variants( base: %( slide-pane absolute inset-y-0 h-[100dvh-(--spacing(16))] bg-white border-r border-gray-200 origin-top-left flex flex-col top-16 w-104 ), variants: { expanded: 'left-0 z-40', '!expanded': 'left-16 z-10' } ).render(expanded: ) end |