linstrom/frontend-reactive/app/components/util/multiselect.ts
mStar 467693d811 Getting work done. Registration form taking shape
Still needs styling and some more elements, but mostly usable now
2024-10-25 16:54:48 +02:00

21 lines
590 B
TypeScript

import { action } from '@ember/object';
import Component from '@glimmer/component';
export interface UtilMultiselectSignature {
// The arguments accepted by the component
Args: {
elements: Array<{ name: string; checked: boolean; description: string }>;
};
// Any blocks yielded by the component
Blocks: {
default: [];
};
// The element to which `...attributes` is applied in the component template
Element: null;
}
export default class UtilMultiselect extends Component<UtilMultiselectSignature> {
@action onChange() {
console.log(this.args.elements);
}
}