app/components/bulmacomp/panel_component.rb in bulmacomp-0.1.1 vs app/components/bulmacomp/panel_component.rb in bulmacomp-0.1.2
- old
+ new
@@ -27,17 +27,16 @@
# @param [Hash] opts
# options to generate content
# @option opts [String] :title
# panel title
# @option opts [String] :*
- # each other key going as tag option, default is class: 'breadcrumb', aria_label: 'breadcrumbs'
+ # each other key going as tag option, default is class: 'panel'
# @yield [optional]
# panel content
def initialize(title: nil, **opts)
super
@title = title
- @opts = opts
- @opts[:class] = 'panel' unless @opts[:class]
+ @opts = { class: 'panel' }.merge(opts)
end
# return [String] html_safe generated bulma panel
def call
content_tag :nav, safe_join([title, content]), **@opts