@verifiedinc-public/shared-ui-elements 0.13.2-beta.6 → 0.14.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verifiedinc-public/shared-ui-elements",
3
- "version": "0.13.2-beta.6",
3
+ "version": "0.14.0",
4
4
  "description": "A set of UI components, utilities that is shareable with the core apps.",
5
5
  "private": false,
6
6
  "keywords": [],
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  closeSnackbar,
11
11
  type CustomContentProps,
12
- enqueueSnackbar,
12
+ enqueueSnackbar as _enqueueSnackbar,
13
13
  SnackbarContent,
14
14
  type SnackbarKey,
15
15
  SnackbarProvider,
@@ -51,30 +51,24 @@ interface CustomAlertComponentProps extends Partial<CustomContentProps> {
51
51
  * Hook to manage snackbar messages
52
52
  * It wraps the enqueueSnackbar and closeSnackbar functions from the notistack library
53
53
  * @returns
54
- * - updateSnackbar: Function to enqueue a snackbar message
54
+ * - enqueueSnackbar: Function to enqueue a snackbar message
55
55
  * - closeSnackbar: Function to close one or all snackbar messages
56
56
  * @see https://notistack.com/api-reference
57
57
  */
58
58
  export function useSnackbar(): {
59
- updateSnackbar: (
59
+ enqueueSnackbar: (
60
60
  message: string,
61
61
  severity?: AlertColor,
62
62
  options?: Omit<CustomAlertComponentProps, 'severity'>,
63
63
  ) => void;
64
64
  closeSnackbar: (key?: SnackbarKey) => void;
65
65
  } {
66
- const updateSnackbar = (
66
+ const enqueueSnackbar = (
67
67
  message: string,
68
68
  severity: AlertColor = 'success',
69
69
  options?: Omit<CustomAlertComponentProps, 'severity'>,
70
70
  ): void => {
71
- console.log({
72
- severity,
73
- variant: 'customAlertComponent',
74
- persist: true,
75
- ...options,
76
- });
77
- enqueueSnackbar(message, {
71
+ _enqueueSnackbar(message, {
78
72
  severity,
79
73
  variant: 'customAlertComponent',
80
74
  persist: true,
@@ -82,7 +76,7 @@ export function useSnackbar(): {
82
76
  });
83
77
  };
84
78
 
85
- return { updateSnackbar, closeSnackbar };
79
+ return { enqueueSnackbar, closeSnackbar };
86
80
  }
87
81
 
88
82
  /**
@@ -135,8 +129,7 @@ export const CustomAlertComponent = forwardRef<
135
129
  sx={{
136
130
  alignItems: 'center',
137
131
  width: '320px',
138
- maxWidth: '320px',
139
- minWidth: '320px',
132
+ ...sx,
140
133
  }}
141
134
  >
142
135
  {message}