Skip to content

panel_helper options need be able to include panel-title and panel-body #19

@suezhou

Description

@suezhou

With current panel-helper

<%= bootstrap_panel_tag 'Apples', class: 'panel-warning', id: 'fruit' do %>
  Check it out!!
<% end %>

will generate the following code

<div id="fruit" class="panel panel-warning">
  <div class="panel-heading">Apples</div>
  Check it out!!
</div>

And most of the time, we need to manually apply panel-title class for the bold heading and panel-body class or bootstrap_panel_body_tag method for the indentation. I think we need to accept options like panel-title: true and panel-body: true so it will generate the following code in one go:

<div id="fruit" class="panel panel-warning">
  <div class="panel-heading">
    <h3 class="panel-title">Apples</div>
  </div>
  <div class="panel-body">
    Check it out!!
  </div>
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions