Class: Protos::Collapse::Title

Inherits:
Protos::Component show all
Defined in:
lib/protos/collapse/title.rb

Instance Method Summary collapse

Methods inherited from Protos::Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#view_templateObject



14
15
16
17
18
19
20
# File 'lib/protos/collapse/title.rb', line 14

def view_template(&)
  if @input_id
    label(for: @input_id.to_s, **attrs, &)
  else
    div(**attrs, &)
  end
end