Class: Ui::ToolbarComponent

Inherits:
SparkComponents::Component
  • Object
show all
Defined in:
app/components/spark/ui/toolbar_component.rb

Instance Method Summary collapse

Instance Method Details

#before_renderObject



6
7
8
9
# File 'app/components/spark/ui/toolbar_component.rb', line 6

def before_render
  data_attr(sticky_constrain: constrain) if constrain
  data_attr(sticky: sticky) if sticky
end

#renderObject



11
12
13
14
15
16
# File 'app/components/spark/ui/toolbar_component.rb', line 11

def render
  tag.div(tag_attrs) {
    concat tag.div(@yield, class: join_class("content")) if @yield
    concat (:div, actions, join_class: "action")
  }
end