Class: LightningUiKit::LayoutComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/lightning_ui_kit/layout_component.rb

Instance Method Summary collapse

Methods inherited from BaseComponent

#merge_classes

Methods included from HeroiconHelper

#heroicon

Constructor Details

#initialize(sidebar_width: "w-64", **options) ⇒ LayoutComponent

Returns a new instance of LayoutComponent.



7
8
9
10
# File 'app/components/lightning_ui_kit/layout_component.rb', line 7

def initialize(sidebar_width: "w-64", **options)
  @sidebar_width = sidebar_width
  @options = options
end

Instance Method Details

#main_padding_classObject



20
21
22
# File 'app/components/lightning_ui_kit/layout_component.rb', line 20

def main_padding_class
  "lui:lg:pl-64"
end


12
13
14
15
16
17
18
# File 'app/components/lightning_ui_kit/layout_component.rb', line 12

def sidebar_width_class
  if @sidebar_width == "w-64"
    "lui:lg:w-64"
  else
    "lui:lg:#{@sidebar_width}"
  end
end