Sha256: 5151330a1515b34bd4bd72e5d70edb50dbc1c5f9f5fcb3dd6ed9fac3b39697d3

Contents?: true

Size: 1.24 KB

Versions: 36

Compression:

Stored size: 1.24 KB

Contents

<p>
  Bootstrap modals are ready to use by rendering the shared partial and creating
  a trigger.
</p>

<p>The partial requires three locals:</p>

<ul>
  <li>
    <code>target</code>: this should match the <code>data-target</code> in your
    trigger
  </li>
  <li>
    <code>title</code>: this will appear in the modal's header
  </li>
  <li>
    <code>content</code>: this will appear in the modal's body. This content can
    be whatever you like – even another partial.
  </li>
</ul>

<div class="style-guide-code half">
  <pre><code class="language-html"><%= %{
    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#your-target">
      Launch demo modal
    </button>

    \<\%= render(
      "spree/admin/shared/modal",
      target: "your-target",
      title: "Your Title",
      content: "The modal's content, could be another partial"
    ) \%\>
  }.strip_heredoc %></code></pre>
</div>

<div class="style-guide-result half">
  <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#your-target">
    Demo Modal
  </button>

  <%= render(
    "spree/admin/shared/modal",
    target: "your-target",
    title: "Your Title",
    content: "The modal's content, could be another partial"
  ) %>
</div>

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
solidus_backend-4.5.1 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.5.0 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.3.6 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.2.5 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.1.6 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.4.2 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.4.1 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.4.0 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.3.4 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.2.4 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.1.5 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.3.3 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.3.2 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.1.4 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.3.1 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.3.0 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.2.3 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.1.3 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-4.0.4 app/views/spree/admin/style_guide/topics/components/_modals.html.erb
solidus_backend-3.4.6 app/views/spree/admin/style_guide/topics/components/_modals.html.erb