39 lines
1.3 KiB
Handlebars
39 lines
1.3 KiB
Handlebars
<div class='relative'>
|
|
<Menu as |menu|>
|
|
<menu.Button>
|
|
<Icons::CogOutline class='mt-1' />
|
|
</menu.Button>
|
|
|
|
<menu.Items
|
|
class='absolute z-dropdown right-0 w-28 min-w-min mt-2 py-1 origin-top-right bg-base-7 border rounded shadow-sm outline-none'
|
|
{{sortable-group onChange=@onChangeSort}}
|
|
>
|
|
{{#each @items as |item|}}
|
|
{{! @ts-ignore }}
|
|
<div
|
|
class='flex items-center px-4 py-2 text-sm hover:bg-base-6 hover:text-base-1 cursor-pointer'
|
|
{{sortable-item model=item}}
|
|
>
|
|
<Icons::DragVertical
|
|
{{sortable-handle}}
|
|
class='mr-2 fill-base-3 cursor-move'
|
|
/>
|
|
<span class='whitespace-nowrap mr-3'>
|
|
{{namelize item}}
|
|
</span>
|
|
{{! @ts-ignore }}
|
|
{{! template-lint-disable no-args-paths }}
|
|
{{! argument action doesn't work like helper with @ }}
|
|
<Form::Checkbox
|
|
@checked={{this.args.isItemChecked item}}
|
|
@onChange={{fn @onToggleItem item}}
|
|
@checkedIcon={{this.checkedIcon}}
|
|
@uncheckedIcon={{this.uncheckedIcon}}
|
|
@iconClass='fill-base-3'
|
|
class='ml-auto'
|
|
/>
|
|
</div>
|
|
{{/each}}
|
|
</menu.Items>
|
|
</Menu>
|
|
</div>
|