Class: Ui::Sheet::Component

Inherits:
BaseComponent
  • Object
show all
Defined in:
lib/uikit_rails/templates/components/sheet/component.rb

Overview

Slide-over panel from any side of the screen.

Constant Summary collapse

SIDES =
%i[top right bottom left].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(side: :right, **html_attrs) ⇒ Component

Returns a new instance of Component.



16
17
18
19
20
# File 'lib/uikit_rails/templates/components/sheet/component.rb', line 16

def initialize(side: :right, **html_attrs)
  @side = side.to_sym
  @html_attrs = html_attrs
  super()
end

Instance Attribute Details

#html_attrsObject (readonly)

Returns the value of attribute html_attrs.



14
15
16
# File 'lib/uikit_rails/templates/components/sheet/component.rb', line 14

def html_attrs
  @html_attrs
end

#sideObject (readonly)

Returns the value of attribute side.



14
15
16
# File 'lib/uikit_rails/templates/components/sheet/component.rb', line 14

def side
  @side
end