Sha256: b5235c1c9123214680028ae4f1308205bd8b0ef296508afc4e61a42d3ccf73d3

Contents?: true

Size: 1.93 KB

Versions: 638

Compression:

Stored size: 1.93 KB

Contents

<%
  options = [
    { label: 'Orange', value: '#FFA500' },
    { label: 'Red', value: '#FF0000' },
    { label: 'Green', value: '#00FF00' },
    { label: 'Blue', value: '#0000FF' },
  ]
%>

<%= pb_rails("typeahead", props: {
    id: "typeahead-default",
    placeholder: "All Colors",
    options: options,
    label: "None",
    name: :foo,
    is_multi: false,
    margin_bottom: "none",
  })
%>
<%= pb_rails("typeahead", props: {
    id: "typeahead-default",
    placeholder: "All Colors",
    options: options,
    label: "XXS",
    name: :foo,
    is_multi: false,
    margin_bottom: "xxs",
  })
%>
<%= pb_rails("typeahead", props: {
    id: "typeahead-default",
    placeholder: "All Colors",
    options: options,
    label: "XS",
    name: :foo,
    is_multi: false,
    margin_bottom: "xs",
  })
%>
<%= pb_rails("typeahead", props: {
    id: "typeahead-default",
    placeholder: "All Colors",
    options: options,
    label: "Default - SM",
    name: :foo,
    is_multi: false,
  })
%>
<%= pb_rails("typeahead", props: {
    id: "typeahead-default",
    placeholder: "All Colors",
    options: options,
    label: "MD",
    name: :foo,
    is_multi: false,
    margin_bottom: "md",
  })
%>
<%= pb_rails("typeahead", props: {
    id: "typeahead-default",
    placeholder: "All Colors",
    options: options,
    label: "LG",
    name: :foo,
    is_multi: false,
    margin_bottom: "lg",
  })
%>
<%= pb_rails("typeahead", props: {
    id: "typeahead-default",
    placeholder: "All Colors",
    options: options,
    label: "XL",
    name: :foo,
    is_multi: false,
    margin_bottom: "xl",
  })
%>

<%= javascript_tag defer: "defer" do %>
  document.addEventListener("pb-typeahead-kit-typeahead-default-result-option-select", function(event) {
    console.log('Single Option selected')
    console.dir(event.detail)
  })
  document.addEventListener("pb-typeahead-kit-typeahead-default-result-clear", function() {
    console.log('All options cleared')
  })
<% end %>

Version data entries

638 entries across 638 versions & 2 rubygems

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