Sha256: e28a4c932991510736893c88fad2ed292517143e06289c69d25fb87824ee5d24

Contents?: true

Size: 1.59 KB

Versions: 823

Compression:

Stored size: 1.59 KB

Contents

<%= pb_rails("button", props: { text: "Short Multiline", variant: "secondary", data: { multitoast: "#toast-short" } }) %>

<%= pb_rails("fixed_confirmation_toast", props: {
  classname: "multitoast-to-hide",
  closeable: true,
  id: "toast-short",
  multi_line: true,
  text: "Multi-line is used when the given text will not fit on one line.",
  status: "tip",
  vertical: "top",
  horizontal: "center"
}) %>

<%= pb_rails("button", props: { text: "Long Multiline", variant: "secondary", data: { multitoast: "#toast-long" } }) %>

<%= pb_rails("fixed_confirmation_toast", props: {
  classname: "multitoast-to-hide",
  closeable: true,
  id: "toast-long",
  multi_line: true,
  text: "Multi-line is used when the given text will not fit on one line. Using Multi Line allows the height of the confirmation toast to grow. Simply resize the screen to see the fixed confirmation toast wrap the text.",
  status: "tip",
  vertical: "top",
  horizontal: "center"
}) %>


<script type="text/javascript">
  const multitoasts = document.querySelectorAll(".multitoast-to-hide")
  const multibuttons = document.querySelectorAll("button[data-multitoast]")

  const hideMultiToasts = () => {
    multitoasts.forEach((toast) => {
      toast.style.display = "none"
    })
  }

  multibuttons.forEach((button) => {
    button.onclick = () => {
      hideMultiToasts()
      let toast = document.querySelector(button.getAttribute("data-multitoast"))

      if (toast) {
        toast.style.display = "flex"
      }
    }
  })
</script>

<!-- hiding toast on page load -->
<style>
  #toast-long, #toast-short {
    display: none;
  }
</style>

Version data entries

823 entries across 823 versions & 2 rubygems

Version Path
playbook_ui_docs-14.8.0.pre.alpha.PLAY1649rolloutheightglobalprops4635 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.8.0.pre.alpha.PLAY1649rolloutheightglobalprops4635 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.9.0.pre.rc.8 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.9.0.pre.rc.8 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.9.0.pre.rc.7 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.9.0.pre.rc.7 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.9.0.pre.rc.6 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.9.0.pre.rc.6 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.9.0.pre.rc.5 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.9.0.pre.rc.5 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.8.0.pre.alpha.pbntr661createstickyleftprop4612 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.8.0.pre.alpha.pbntr661createstickyleftprop4612 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.8.0.pre.alpha.play1648heightglobalprops4606 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.8.0.pre.alpha.play1648heightglobalprops4606 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.9.0.pre.rc.4 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.9.0.pre.rc.4 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.9.0.pre.rc.3 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.9.0.pre.rc.3 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb