@dosgato/dialog 1.4.0 → 1.4.2

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.
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" generics="T extends TreeItemFromDB = TreeItemFromDB">
2
- import { get, toArray } from 'txstate-utils'
2
+ import { get, isNotBlank, toArray } from 'txstate-utils'
3
3
  import { Icon } from '..'
4
4
  import type { TreeHeader, TreeItemFromDB, TypedTreeItem } from './treestore'
5
5
 
@@ -12,7 +12,7 @@
12
12
  </script>
13
13
 
14
14
  {#each leadingIcons as icon}
15
- <span class="icon">
15
+ <span class={['icon', icon.class?.trim()].filter(isNotBlank).join(' ')}>
16
16
  <Icon icon={icon.icon} tooltip={icon.tooltip} inline width="1.5em" hiddenLabel={icon.label} />
17
17
  </span>
18
18
  {/each}
@@ -26,7 +26,7 @@
26
26
  {#if trailingIcons.length}
27
27
  <span class="trailing-icons">
28
28
  {#each trailingIcons as icon}
29
- <span class="icon">
29
+ <span class={['icon', icon.class?.trim()].filter(isNotBlank).join(' ')}>
30
30
  <Icon icon={icon.icon} tooltip={icon.tooltip} inline width="1.5em" hiddenLabel={icon.label} />
31
31
  </span>
32
32
  {/each}
@@ -38,6 +38,7 @@ export type SearchableFn<T extends TreeItemFromDB> = (item: TypedTreeItem<T>) =>
38
38
  export interface TreeIcon {
39
39
  icon: IconifyIcon;
40
40
  label?: string;
41
+ class?: string;
41
42
  trailing?: boolean;
42
43
  tooltip?: string;
43
44
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dosgato/dialog",
3
3
  "description": "A component library for building forms that edit a JSON document.",
4
- "version": "1.4.0",
4
+ "version": "1.4.2",
5
5
  "scripts": {
6
6
  "prepublishOnly": "svelte-package",
7
7
  "dev": "vite dev --force",