import hbs from 'htmlbars-inline-precompile'; export default { title: 'Components/Dropdown', }; let options = [ { name: 'Consul' }, { name: 'Nomad' }, { name: 'Packer' }, { name: 'Terraform' }, { name: 'Vagrant' }, { name: 'Vault' }, ]; export let Standard = () => { return { template: hbs`
Power Select currently fulfills all of Nomad's dropdown needs out of the box.
`, context: { options, }, }; }; export let Resized = () => { return { template: hbs`Dropdowns are always 100% wide. To control the width of a dropdown, adjust the dimensions of its container. One way to achieve this is using columns.
`, context: { options, }, }; }; export let Search = () => { return { template: hbs`Whether or not the dropdown has a search box is configurable. Typically the default is to show a search once a dropdown has more than 10 options.
`, context: { manyOptions: [ 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', ].map((name) => ({ name })), }, }; };