@dismissible/react-client 0.3.2-canary.2.38782c4 → 0.3.2-canary.4.578bcba

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,26 +1,26 @@
1
1
  import { default as React } from 'react';
2
+ import { IMetadata } from '../hooks/useDismissibleItem';
2
3
  /**
3
4
  * Props for the Dismissible component
4
5
  */
5
6
  export interface DismissibleProps {
6
7
  /** Unique identifier for the dismissible item */
7
- id: string;
8
+ itemId: string;
8
9
  /** Content to render when the item is not dismissed */
9
10
  children: React.ReactNode;
10
11
  /** Optional callback when item is dismissed */
11
12
  onDismiss?: () => void;
12
13
  /** Optional custom loading component */
13
14
  LoadingComponent?: React.ComponentType<{
14
- id: string;
15
+ itemId: string;
15
16
  }> | null;
16
17
  /** Optional custom error component */
17
18
  ErrorComponent?: React.ComponentType<{
18
- id: string;
19
+ itemId: string;
19
20
  error: Error;
20
21
  }> | null;
21
22
  /** Optional custom dismiss button component */
22
23
  DismissButtonComponent?: React.ComponentType<{
23
- id: string;
24
24
  onDismiss: () => Promise<void>;
25
25
  ariaLabel: string;
26
26
  }> | null;
@@ -32,6 +32,8 @@ export interface DismissibleProps {
32
32
  cacheExpiration?: number;
33
33
  /** Ignore errors and display the component anyway (default: false) */
34
34
  ignoreErrors?: boolean;
35
+ /** Optional metadata object that will be converted to key:value string pairs */
36
+ metadata?: IMetadata;
35
37
  }
36
38
  /**
37
39
  * A wrapper component that can be dismissed and hidden by users
@@ -47,6 +49,7 @@ export interface DismissibleProps {
47
49
  * @param cachePrefix - Cache key prefix
48
50
  * @param cacheExpiration - Cache expiration time in milliseconds
49
51
  * @param ignoreErrors - Ignore errors and display the component anyway
52
+ * @param metadata - Optional metadata object that will be converted to key:value string pairs
50
53
  * @returns JSX element or null if dismissed
51
54
  */
52
55
  export declare const Dismissible: React.FC<DismissibleProps>;