@invopop/popui 0.1.13 → 0.1.14

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.
@@ -5,6 +5,8 @@
5
5
  import FeedEvents from './FeedEvents.svelte'
6
6
  import { slide } from 'svelte/transition'
7
7
  import SeparatorHorizontal from './SeparatorHorizontal.svelte'
8
+ import BaseButton from './BaseButton.svelte'
9
+ import { Close } from '@invopop/ui-icons'
8
10
 
9
11
  let {
10
12
  status = undefined,
@@ -12,7 +14,9 @@
12
14
  uuid = '',
13
15
  events = [],
14
16
  idLabel = 'ID:',
15
- onCopied
17
+ cancelable = false,
18
+ onCopied,
19
+ onCancel
16
20
  }: FeedItemDetailProps = $props()
17
21
 
18
22
  let open = $state(false)
@@ -24,6 +28,18 @@
24
28
  <FeedIconStatus {status} />
25
29
  {/if}
26
30
  <span class="flex-1 truncate font-medium text-neutral-800 text-base">{title}</span>
31
+ {#if cancelable}
32
+ <BaseButton
33
+ small
34
+ icon={Close}
35
+ variant="secondary"
36
+ onclick={() => {
37
+ onCancel?.()
38
+ }}
39
+ >
40
+ Cancel
41
+ </BaseButton>
42
+ {/if}
27
43
  </div>
28
44
  <SeparatorHorizontal />
29
45
  <div class="pl-3 py-1 pr-2.5 flex items-center space-x-0.5">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.1.13",
4
+ "version": "0.1.14",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "dev:clean": "npm run clean && vite dev",