@shopify/app-bridge-react 4.0.0 → 4.1.1

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.
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
2
2
  import type { ShopifyGlobal } from '@shopify/app-bridge-types';
3
3
  import type { UIModalAttributes } from '@shopify/app-bridge-types';
4
4
  import type { UINavMenuAttributes } from '@shopify/app-bridge-types';
5
+ import type { UISaveBarAttributes } from '@shopify/app-bridge-types';
5
6
  import type { UITitleBarAttributes } from '@shopify/app-bridge-types';
6
7
 
7
8
  /**
@@ -43,6 +44,32 @@ export declare interface NavMenuProps extends Omit<UINavMenuAttributes, 'childre
43
44
  children?: ReactNode;
44
45
  }
45
46
 
47
+ /**
48
+ * This component is a wrapper around the App Bridge `ui-save-bar` element.
49
+ * It is used to display a contextual save bar to signal dirty state in the app.
50
+ *
51
+ * @see {@link https://shopify.dev/docs/api/app-bridge-library/react-components/save-bar}
52
+ */
53
+ export declare const SaveBar: React.ForwardRefExoticComponent<SaveBarProps & React.RefAttributes<UISaveBarElement>>;
54
+
55
+ export declare interface SaveBarProps extends Omit<UISaveBarAttributes, 'children'> {
56
+ /**
57
+ * Whether the saveBar is open or not
58
+ *
59
+ * @defaultValue false
60
+ */
61
+ open?: boolean;
62
+ /**
63
+ * Callback that is called when the saveBar is opened
64
+ */
65
+ onShow?(): void;
66
+ /**
67
+ * Callback that is called when the saveBar is closed
68
+ */
69
+ onHide?(): void;
70
+ children?: ReactNode;
71
+ }
72
+
46
73
  /**
47
74
  * This component is a wrapper around the App Bridge `ui-title-bar` element.
48
75
  * It is used to to populate the app title bar with button actions or the