@invopop/popui 0.1.73 → 0.1.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -484,12 +484,16 @@
484
484
  {#if item.separator}
485
485
  <DrawerContextSeparator />
486
486
  {:else}
487
+ {#snippet itemChildren()}
488
+ {@render item.content?.(item)}
489
+ {/snippet}
487
490
  <div class:px-1={!item.groupBy} class:cursor-grab={draggable && !item.locked}>
488
491
  <DrawerContextItem
489
492
  item={{ ...item, focused: item.value === focusedItemValue, flagPosition: item.flagPosition || flagPosition }}
490
493
  {multiple}
491
494
  {onclick}
492
495
  onchange={updateItem}
496
+ children={item.content ? itemChildren : undefined}
493
497
  />
494
498
  </div>
495
499
  {/if}
package/dist/types.d.ts CHANGED
@@ -42,6 +42,7 @@ export type DrawerOption = SelectOption & {
42
42
  groupBy?: string;
43
43
  useAvatar?: boolean;
44
44
  action?: Snippet<[DrawerOption]>;
45
+ content?: Snippet<[DrawerOption]>;
45
46
  flagPosition?: 'before' | 'after';
46
47
  };
47
48
  export type Company = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.1.73",
4
+ "version": "0.1.74",
5
5
  "repository": {
6
6
  "url": "https://github.com/invopop/popui"
7
7
  },