Sha256: aef3750de2a06aa9d1cefe271077d2c8be41967f967ba798feb0684a9b52790f
Contents?: true
Size: 859 Bytes
Versions: 71
Compression:
Stored size: 859 Bytes
Contents
<%= render(Primer::Alpha::Dialog.new(id: "my-dialog", title: "Confirm focus")) do |d| %> <%= render(Primer::Alpha::Dialog::Body.new()) do %> Are you sure you want to focus the input? <% end %> <%= render(Primer::Alpha::Dialog::Footer.new()) do %> <%= render(Primer::Beta::Button.new(id: "yes-button", data: { "close-dialog-id": "my-dialog" })) { "Yes" } %> <%= render(Primer::Beta::Button.new(scheme: :primary, data: { "close-dialog-id": "my-dialog" })) { "Yes but in green" } %> <% end %> <% d.with_show_button do |b| %> Focus input <% b.with_tooltip(text: "This is a tooltip in an Overlay") %> <% end %> <% end %> <label> An input <input type="text" id="input"> </label> <script> document.querySelector('#my-dialog').addEventListener('close', function () { document.querySelector('#input').focus(); }); </script>
Version data entries
71 entries across 71 versions & 2 rubygems