Sha256: 07d08f4238ea71ab65e06bfbec4881394a015e010ff2dc7dc29642f3e98b48ea
Contents?: true
Size: 1.26 KB
Versions: 112
Compression:
Stored size: 1.26 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> <%- snippet = capture do %> <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" ) %> <%- end %> <div class="style-guide-code half"> <pre><code class="language-html"><%= escape_once snippet %></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
112 entries across 112 versions & 2 rubygems