Sha256: 278f4940691f7a4e9fb0e9608192f8bec5c2f25fbf6d23139970be69287878a8
Contents?: true
Size: 878 Bytes
Versions: 18
Compression:
Stored size: 878 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" autocomplete="off"> </label> <script> document.querySelector('#my-dialog').addEventListener('close', function () { document.querySelector('#input').focus(); }); </script>
Version data entries
18 entries across 18 versions & 2 rubygems