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`
Dropdown
{{option.name}}

Power Select currently fulfills all of Nomad's dropdown needs out of the box.

`, context: { options, }, }; }; export let Resized = () => { return { template: hbs`
Dropdown resized
{{option.name}}

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`
Dropdown with search
{{option.name}}

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 })), }, }; };