diff --git a/app/components/input-select.hbs b/app/components/input-select.hbs new file mode 100644 index 0000000..26cd39a --- /dev/null +++ b/app/components/input-select.hbs @@ -0,0 +1,18 @@ +
+ {{#if @label}} + + {{/if}} + + {{yield option select}} + +
diff --git a/app/components/input-select.js b/app/components/input-select.js new file mode 100644 index 0000000..6b720a7 --- /dev/null +++ b/app/components/input-select.js @@ -0,0 +1,20 @@ +import Component from '@glimmer/component'; +import { guidFor } from '@ember/object/internals'; +import { action } from '@ember/object'; + +export default class InputSelectComponent extends Component { + get guid() { + return guidFor(this); + } + + get id() { + return this.args.id ?? this.guid; + } + + @action + onChange(event) { + if (this.args.onChange) { + this.args.onChange(event.target.value, event); + } + } +} diff --git a/app/styles/app.css b/app/styles/app.css index 060961a..7d91700 100644 --- a/app/styles/app.css +++ b/app/styles/app.css @@ -1,6 +1,7 @@ @tailwind base; @tailwind components; @tailwind utilities; +@import 'ember-basic-dropdown'; .md-icon { fill: currentColor; diff --git a/app/templates/admin/indexes/item/settings.hbs b/app/templates/admin/indexes/item/settings.hbs index f66553a..4b4c8aa 100644 --- a/app/templates/admin/indexes/item/settings.hbs +++ b/app/templates/admin/indexes/item/settings.hbs @@ -1,7 +1,7 @@ {{page-title "Settings"}} {{#let (hash td="px-4 py-2 text-left whitespace-nowrap") as |classes|}} -

Attributes

+ @@ -46,6 +46,16 @@
{{/let}} + + {{option}} + +