Sha256: d3608a7981a4cf003bb159f29b1be36249d6fcebaa6d82a45736551f761a639c
Contents?: true
Size: 551 Bytes
Versions: 57
Compression:
Stored size: 551 Bytes
Contents
<% time = Time.utc(2020, 1, 1, 0, 0, 0) %> <%= render(Primer::Beta::Link.new(href: "#", id: "link")) do |link| %> <% link.with_tooltip(id: "tool-tip", text: time.to_s) %> <%= render(Primer::Beta::RelativeTime.new(id: "relative-time", datetime: time, no_title: true)) %> <% end %> <script> // When `<relative-time>`’s `title` changes, update `<tool-tip>` text. document.getElementById("relative-time").addEventListener("relative-time-updated", ({newTitle}) => { document.getElementById("tool-tip").textContent = newTitle }) </script>
Version data entries
57 entries across 57 versions & 2 rubygems