Sha256: e28a4c932991510736893c88fad2ed292517143e06289c69d25fb87824ee5d24

Contents?: true

Size: 1.59 KB

Versions: 1098

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

1,098 entries across 1,098 versions & 2 rubygems

Version Path
playbook_ui_docs-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui_docs-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
playbook_ui-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb