@xsolla/xui-b2b-notification-panel 0.190.0 → 0.191.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/README.md CHANGED
@@ -21,6 +21,7 @@ npm install @xsolla/xui-b2b-notification-panel
21
21
  import {
22
22
  NotificationPanel,
23
23
  type NotificationPanelProps,
24
+ type NotificationPanelDevice,
24
25
  type ActionButtonElement,
25
26
  } from '@xsolla/xui-b2b-notification-panel';
26
27
  ```
@@ -44,6 +45,7 @@ import { NotificationPanel } from '@xsolla/xui-b2b-notification-panel';
44
45
  | Prop | Type | Default | Description |
45
46
  | --- | --- | --- | --- |
46
47
  | `variant` | `"notification" \| "announcement"` | `"notification"` | Layout. `notification` is the taller banner with an icon frame; `announcement` is the slim, single-line bar. |
48
+ | `device` | `"desktop" \| "mobile"` | `"desktop"` | Device layout. Mobile `notification` uses a three-column row (icon \| stacked text + action \| close). Mobile `announcement` puts icon and title on one row, description below, and groups action + close on the right (top-aligned). |
47
49
  | `type` | `"alert" \| "warning" \| "success" \| "neutral" \| "brand"` | `"neutral"` | Visual tone of the panel. Controls background, default icon, and `role`. |
48
50
  | `title` | `string` | — | Bold title text. |
49
51
  | `description` | `string` | — | Secondary description text. |
@@ -52,7 +54,7 @@ import { NotificationPanel } from '@xsolla/xui-b2b-notification-panel';
52
54
  | `actionButton` | `ActionButtonElement` | — | A `Button`, `IconButton`, or `FlexButton` element. The panel injects styling via `cloneElement` (see below). |
53
55
  | `showCloseButton` | `boolean` | `true` | Show or hide the dismiss (×) button. |
54
56
  | `onClose` | `() => void` | — | Called when the close button is pressed. |
55
- | `closeButtonAlign` | `"top" \| "center"` | `"top"` | Vertical alignment of the close button. Applies to the `notification` variant only (`announcement` is always centered). |
57
+ | `closeButtonAlign` | `"top" \| "center"` | `"center"` | Vertical alignment of the action/close button group. Applies to the desktop `notification` variant only. |
56
58
  | `testID` | `string` | — | Test ID for testing frameworks. |
57
59
 
58
60
  Inherits `ThemeOverrideProps` (`themeMode`, `themeProductContext`).
@@ -65,10 +67,10 @@ type ActionButtonElement = React.ReactElement<
65
67
  >;
66
68
  ```
67
69
 
68
- The element passed to `actionButton`. The panel overrides a small set of props via `cloneElement` so the button matches the design; everything else (`onPress`, `icon`, `children`, etc.) is forwarded as authored. The injected props depend on `variant`:
70
+ The element passed to `actionButton`. The panel overrides a small set of props via `cloneElement` so the button matches the design; everything else (`onPress`, `icon`, `children`, etc.) is forwarded as authored:
69
71
 
70
- - **`notification`** — `size="xs"`, `variant="tertiary"`, `tone="mono"`. Pass a `Button`.
71
- - **`announcement`** — `size="xs"`, `variant="primary"`, `background={false}`. Pass a [`FlexButton`](./button.md) so it renders text-only with the designed subtle hover. (`FlexButton` has no `tone`; the Primary palette gives `content.primary` text.)
72
+ - **`FlexButton` / `Button`** — `size="xs"`, `variant="primary"`, `background={false}` (text-only XS action per Figma). Prefer [`FlexButton`](./button.md).
73
+ - **`IconButton`** — `size="xs"` only.
72
74
 
73
75
  ## Examples
74
76
 
@@ -88,17 +90,35 @@ import { NotificationPanel } from '@xsolla/xui-b2b-notification-panel';
88
90
 
89
91
  ### With action button
90
92
 
91
- The panel styles the button to match the design (`size`, `variant`, and `tone`/`background` — see [`ActionButtonElement`](#actionbuttonelement)), so pass a plain `Button`.
93
+ Pass a [`FlexButton`](./button.md) in size XS styling — the panel injects `size="xs"`, `variant="primary"`, and `background={false}`.
92
94
 
93
95
  ```tsx
94
96
  import { NotificationPanel } from '@xsolla/xui-b2b-notification-panel';
95
- import { Button } from '@xsolla/xui-button';
97
+ import { FlexButton } from '@xsolla/xui-button';
96
98
 
97
99
  <NotificationPanel
98
100
  type="warning"
99
101
  title="Session expiring"
100
102
  description="Your session will expire in 5 minutes."
101
- actionButton={<Button onPress={() => extendSession()}>Extend session</Button>}
103
+ actionButton={<FlexButton onPress={() => extendSession()}>Extend session</FlexButton>}
104
+ onClose={() => dismiss()}
105
+ />;
106
+ ```
107
+
108
+ ### Mobile layout
109
+
110
+ On narrow viewports, pass `device="mobile"` for the Figma mobile layout: icon column on the left, title and description stacked in the center with the action below them, close button in the right column.
111
+
112
+ ```tsx
113
+ import { NotificationPanel } from '@xsolla/xui-b2b-notification-panel';
114
+ import { FlexButton } from '@xsolla/xui-button';
115
+
116
+ <NotificationPanel
117
+ device="mobile"
118
+ type="alert"
119
+ title="Alert notification"
120
+ description="A mutual NDA is required to begin your partnership with Xsolla"
121
+ actionButton={<FlexButton onPress={() => openNda()}>Button</FlexButton>}
102
122
  onClose={() => dismiss()}
103
123
  />;
104
124
  ```
@@ -164,7 +184,9 @@ import { NotificationPanel } from '@xsolla/xui-b2b-notification-panel';
164
184
  />;
165
185
  ```
166
186
 
167
- ### Center-aligned close button
187
+ ### Top-aligned action/close buttons
188
+
189
+ Use `closeButtonAlign="top"` when the button group should align with the title instead of the default vertical centering.
168
190
 
169
191
  ```tsx
170
192
  import { NotificationPanel } from '@xsolla/xui-b2b-notification-panel';
@@ -172,7 +194,8 @@ import { NotificationPanel } from '@xsolla/xui-b2b-notification-panel';
172
194
  <NotificationPanel
173
195
  type="success"
174
196
  title="Saved"
175
- closeButtonAlign="center"
197
+ description="This is a neutral notification message"
198
+ closeButtonAlign="top"
176
199
  onClose={() => dismiss()}
177
200
  />;
178
201
  ```
@@ -180,6 +203,6 @@ import { NotificationPanel } from '@xsolla/xui-b2b-notification-panel';
180
203
  ## Accessibility
181
204
 
182
205
  - `role="alert"` for `type="alert"`; `role="status"` for all other types.
183
- - `aria-label` on the root is `"<type> <variant>"` (e.g. `"warning notification"`, `"alert announcement"`).
184
- - The close button is an `IconButton` with `aria-label="Close notification"`.
206
+ - `aria-label` on the root is `"<type> <variant> <device>"` (e.g. `"warning notification desktop"`, `"alert announcement mobile"`).
207
+ - The close control is an icon-only [`IconButton`](./button.md) (`variant="tertiary"`, `tone="mono"`, `size="xs"`, `hoverBackground="none"`) with `aria-label="Close notification"`. Uses Box/`onPress` so it works on React Native as well as web.
185
208
  - The default type icons are decorative — pass `aria-hidden` on any custom `icon` you supply.
@@ -3,6 +3,7 @@ import { ThemeOverrideProps } from '@xsolla/xui-core';
3
3
  import { ButtonProps, IconButtonProps, FlexButtonProps } from '@xsolla/xui-button';
4
4
 
5
5
  type ActionButtonElement = React.ReactElement<ButtonProps | IconButtonProps | FlexButtonProps>;
6
+ type NotificationPanelDevice = "desktop" | "mobile";
6
7
  interface NotificationPanelProps extends ThemeOverrideProps {
7
8
  /**
8
9
  * Layout variant.
@@ -12,6 +13,15 @@ interface NotificationPanelProps extends ThemeOverrideProps {
12
13
  * title/description on one row.
13
14
  */
14
15
  variant?: "notification" | "announcement";
16
+ /**
17
+ * Device layout mode.
18
+ * - `desktop` (default): horizontal layout with actions on the right.
19
+ * - `mobile`: Figma mobile layout — `notification` uses a three-column row
20
+ * (icon | stacked text + action | close); `announcement` puts icon, title,
21
+ * on one row with description below; action and close are grouped on the
22
+ * right, top-aligned with the title row.
23
+ */
24
+ device?: NotificationPanelDevice;
15
25
  /** Visual variant/tone of the notification */
16
26
  type?: "alert" | "warning" | "success" | "neutral" | "brand";
17
27
  /** Title text (optional) */
@@ -31,10 +41,13 @@ interface NotificationPanelProps extends ThemeOverrideProps {
31
41
  showCloseButton?: boolean;
32
42
  /** Close button click handler */
33
43
  onClose?: () => void;
34
- /** Vertical alignment of the close button — "top" (default) or "center" */
44
+ /**
45
+ * Vertical alignment of the action/close button group — "center" (default) or
46
+ * "top". Applies to the desktop `notification` variant only.
47
+ */
35
48
  closeButtonAlign?: "center" | "top";
36
49
  testID?: string;
37
50
  }
38
51
  declare const NotificationPanel: React.FC<NotificationPanelProps>;
39
52
 
40
- export { type ActionButtonElement, NotificationPanel, type NotificationPanelProps };
53
+ export { type ActionButtonElement, NotificationPanel, type NotificationPanelDevice, type NotificationPanelProps };
package/native/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import { ThemeOverrideProps } from '@xsolla/xui-core';
3
3
  import { ButtonProps, IconButtonProps, FlexButtonProps } from '@xsolla/xui-button';
4
4
 
5
5
  type ActionButtonElement = React.ReactElement<ButtonProps | IconButtonProps | FlexButtonProps>;
6
+ type NotificationPanelDevice = "desktop" | "mobile";
6
7
  interface NotificationPanelProps extends ThemeOverrideProps {
7
8
  /**
8
9
  * Layout variant.
@@ -12,6 +13,15 @@ interface NotificationPanelProps extends ThemeOverrideProps {
12
13
  * title/description on one row.
13
14
  */
14
15
  variant?: "notification" | "announcement";
16
+ /**
17
+ * Device layout mode.
18
+ * - `desktop` (default): horizontal layout with actions on the right.
19
+ * - `mobile`: Figma mobile layout — `notification` uses a three-column row
20
+ * (icon | stacked text + action | close); `announcement` puts icon, title,
21
+ * on one row with description below; action and close are grouped on the
22
+ * right, top-aligned with the title row.
23
+ */
24
+ device?: NotificationPanelDevice;
15
25
  /** Visual variant/tone of the notification */
16
26
  type?: "alert" | "warning" | "success" | "neutral" | "brand";
17
27
  /** Title text (optional) */
@@ -31,10 +41,13 @@ interface NotificationPanelProps extends ThemeOverrideProps {
31
41
  showCloseButton?: boolean;
32
42
  /** Close button click handler */
33
43
  onClose?: () => void;
34
- /** Vertical alignment of the close button — "top" (default) or "center" */
44
+ /**
45
+ * Vertical alignment of the action/close button group — "center" (default) or
46
+ * "top". Applies to the desktop `notification` variant only.
47
+ */
35
48
  closeButtonAlign?: "center" | "top";
36
49
  testID?: string;
37
50
  }
38
51
  declare const NotificationPanel: React.FC<NotificationPanelProps>;
39
52
 
40
- export { type ActionButtonElement, NotificationPanel, type NotificationPanelProps };
53
+ export { type ActionButtonElement, NotificationPanel, type NotificationPanelDevice, type NotificationPanelProps };
package/native/index.js CHANGED
@@ -209,6 +209,7 @@ var import_xui_icons_base = require("@xsolla/xui-icons-base");
209
209
  var import_jsx_runtime2 = require("react/jsx-runtime");
210
210
  var NotificationPanel = ({
211
211
  variant = "notification",
212
+ device = "desktop",
212
213
  type = "neutral",
213
214
  title,
214
215
  description,
@@ -217,13 +218,13 @@ var NotificationPanel = ({
217
218
  actionButton,
218
219
  showCloseButton = true,
219
220
  onClose,
220
- closeButtonAlign = "top",
221
+ closeButtonAlign = "center",
221
222
  testID,
222
223
  themeMode,
223
224
  themeProductContext
224
225
  }) => {
225
226
  const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
226
- const config = theme.sizing.notificationPanel();
227
+ const config = theme.sizing.notificationPanel(device);
227
228
  const typeConfig = {
228
229
  alert: {
229
230
  panelBg: theme.colors.overlay.alert,
@@ -270,16 +271,120 @@ var NotificationPanel = ({
270
271
  const IconComponent = currentConfig.IconComponent;
271
272
  const ariaProps = {
272
273
  role: type === "alert" ? "alert" : "status",
273
- "aria-label": `${type} ${variant}`
274
+ "aria-label": `${type} ${variant} ${device}`
275
+ };
276
+ const renderCloseButton = (iconSize) => showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
277
+ import_xui_button.IconButton,
278
+ {
279
+ variant: "tertiary",
280
+ tone: "mono",
281
+ size: "xs",
282
+ onPress: onClose,
283
+ "aria-label": "Close notification",
284
+ icon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_xui_icons_base.Remove, { size: iconSize }),
285
+ hoverBackground: "none"
286
+ }
287
+ ) : null;
288
+ const renderActionButton = () => {
289
+ if (!(0, import_react.isValidElement)(actionButton)) return null;
290
+ const element = actionButton;
291
+ const isIconButton = element.type.displayName === "IconButton";
292
+ return (0, import_react.cloneElement)(
293
+ element,
294
+ isIconButton ? { size: "xs" } : { size: "xs", variant: "primary", background: false }
295
+ );
274
296
  };
275
297
  if (variant === "announcement") {
298
+ const isMobileAnnouncement = device === "mobile";
299
+ if (isMobileAnnouncement) {
300
+ const descriptionIndent = showIcon ? config.announcementIconSize + config.announcementContentGap : 0;
301
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
302
+ Box,
303
+ {
304
+ backgroundColor: currentConfig.announcementBg,
305
+ flexDirection: "row",
306
+ alignItems: "stretch",
307
+ padding: config.announcementPadding,
308
+ gap: config.announcementGap,
309
+ overflow: "hidden",
310
+ testID,
311
+ style: {
312
+ backdropFilter: `blur(${config.announcementBlurRadius}px)`
313
+ },
314
+ ...ariaProps,
315
+ children: [
316
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
317
+ Box,
318
+ {
319
+ flex: 1,
320
+ minWidth: 0,
321
+ flexDirection: "column",
322
+ gap: config.textGap,
323
+ children: [
324
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
325
+ Box,
326
+ {
327
+ flexDirection: "row",
328
+ alignItems: "flex-start",
329
+ gap: config.announcementContentGap,
330
+ children: [
331
+ showIcon && (icon || /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
332
+ IconComponent,
333
+ {
334
+ size: config.announcementIconSize,
335
+ color: currentConfig.iconColor,
336
+ variant: "solid"
337
+ }
338
+ )),
339
+ title && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box, { flex: 1, minWidth: 0, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
340
+ import_xui_typography.Typography,
341
+ {
342
+ variant: "bodyXsAccent",
343
+ color: theme.colors.content.primary,
344
+ noWrap: true,
345
+ children: title
346
+ }
347
+ ) })
348
+ ]
349
+ }
350
+ ),
351
+ description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box, { paddingLeft: descriptionIndent, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
352
+ import_xui_typography.Typography,
353
+ {
354
+ variant: "bodyXs",
355
+ color: theme.colors.content.secondary,
356
+ noWrap: true,
357
+ children: description
358
+ }
359
+ ) })
360
+ ]
361
+ }
362
+ ),
363
+ (actionButton || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
364
+ Box,
365
+ {
366
+ flexShrink: 0,
367
+ alignSelf: "flex-start",
368
+ flexDirection: "row",
369
+ alignItems: "center",
370
+ gap: config.announcementButtonsGap,
371
+ children: [
372
+ renderActionButton(),
373
+ renderCloseButton(config.announcementCloseIconSize)
374
+ ]
375
+ }
376
+ )
377
+ ]
378
+ }
379
+ );
380
+ }
276
381
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
277
382
  Box,
278
383
  {
279
384
  backgroundColor: currentConfig.announcementBg,
280
385
  flexDirection: "row",
281
386
  alignItems: "center",
282
- justifyContent: "center",
387
+ justifyContent: "flex-start",
283
388
  padding: config.announcementPadding,
284
389
  gap: config.announcementGap,
285
390
  overflow: "hidden",
@@ -307,15 +412,37 @@ var NotificationPanel = ({
307
412
  variant: "solid"
308
413
  }
309
414
  )),
310
- title && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
311
- import_xui_typography.Typography,
415
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
416
+ Box,
312
417
  {
313
- variant: "bodyXsAccent",
314
- color: theme.colors.content.primary,
315
- children: title
418
+ flex: 1,
419
+ minWidth: 0,
420
+ overflow: "hidden",
421
+ flexDirection: "row",
422
+ alignItems: "center",
423
+ gap: config.announcementContentGap,
424
+ children: [
425
+ title && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
426
+ import_xui_typography.Typography,
427
+ {
428
+ variant: "bodyXsAccent",
429
+ color: theme.colors.content.primary,
430
+ noWrap: true,
431
+ children: title
432
+ }
433
+ ),
434
+ description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
435
+ import_xui_typography.Typography,
436
+ {
437
+ variant: "bodyXs",
438
+ color: theme.colors.content.secondary,
439
+ noWrap: true,
440
+ children: description
441
+ }
442
+ )
443
+ ]
316
444
  }
317
- ),
318
- description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_xui_typography.Typography, { variant: "bodyXs", color: theme.colors.content.secondary, children: description })
445
+ )
319
446
  ]
320
447
  }
321
448
  ),
@@ -327,29 +454,93 @@ var NotificationPanel = ({
327
454
  alignItems: "center",
328
455
  gap: config.announcementButtonsGap,
329
456
  children: [
330
- (0, import_react.isValidElement)(actionButton) && (0, import_react.cloneElement)(actionButton, {
331
- size: "xs",
332
- // Announcement uses a text-only FlexButton (Primary palette →
333
- // content.primary text, no fill), per the Figma "Flex Button"
334
- // node. hoverBackground is left at its default so the subtle
335
- // mono hover overlay from the design is preserved.
336
- variant: "primary",
337
- background: false
338
- }),
339
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
340
- import_xui_button.IconButton,
341
- {
342
- variant: "tertiary",
343
- tone: "mono",
344
- size: "xs",
345
- onPress: onClose,
346
- "aria-label": "Close notification",
347
- icon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_xui_icons_base.Remove, { size: config.announcementCloseIconSize }),
348
- hoverBackground: "none"
349
- }
350
- )
457
+ renderActionButton(),
458
+ renderCloseButton(config.announcementCloseIconSize)
459
+ ]
460
+ }
461
+ )
462
+ ]
463
+ }
464
+ );
465
+ }
466
+ if (device === "mobile") {
467
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
468
+ Box,
469
+ {
470
+ backgroundColor: currentConfig.panelBg,
471
+ borderRadius: config.borderRadius,
472
+ flexDirection: "row",
473
+ alignItems: "flex-start",
474
+ justifyContent: "space-between",
475
+ overflow: "hidden",
476
+ testID,
477
+ ...ariaProps,
478
+ children: [
479
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
480
+ Box,
481
+ {
482
+ alignSelf: "stretch",
483
+ paddingTop: config.mobileIconColumnPaddingVertical,
484
+ paddingBottom: config.mobileIconColumnPaddingVertical,
485
+ paddingLeft: config.mobileIconColumnPaddingLeft,
486
+ alignItems: "flex-start",
487
+ justifyContent: "flex-start",
488
+ children: icon || /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
489
+ IconComponent,
490
+ {
491
+ size: config.mobileIconSize,
492
+ color: currentConfig.iconColor,
493
+ variant: "solid"
494
+ }
495
+ )
496
+ }
497
+ ),
498
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
499
+ Box,
500
+ {
501
+ flex: 1,
502
+ minWidth: 0,
503
+ paddingHorizontal: config.mobileBodyPaddingHorizontal,
504
+ paddingVertical: config.mobileBodyPaddingVertical,
505
+ flexDirection: "column",
506
+ alignItems: "flex-start",
507
+ justifyContent: "center",
508
+ gap: config.mobileBodyContentGap,
509
+ children: [
510
+ (title || description) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box, { alignSelf: "stretch", gap: config.textGap, children: [
511
+ title && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
512
+ import_xui_typography.Typography,
513
+ {
514
+ variant: "bodySmAccent",
515
+ color: theme.colors.content.primary,
516
+ children: title
517
+ }
518
+ ),
519
+ description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
520
+ import_xui_typography.Typography,
521
+ {
522
+ variant: "bodyXs",
523
+ color: theme.colors.content.tertiary,
524
+ children: description
525
+ }
526
+ )
527
+ ] }),
528
+ actionButton && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box, { marginLeft: config.mobileNotificationActionButtonOffsetLeft, children: renderActionButton() })
351
529
  ]
352
530
  }
531
+ ),
532
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
533
+ Box,
534
+ {
535
+ alignSelf: "stretch",
536
+ flexDirection: "row",
537
+ paddingTop: config.mobileCloseColumnPaddingVertical,
538
+ paddingBottom: config.mobileCloseColumnPaddingVertical,
539
+ paddingRight: config.mobileCloseColumnPaddingRight,
540
+ alignItems: "flex-start",
541
+ justifyContent: "flex-end",
542
+ children: renderCloseButton(config.notificationCloseIconSize)
543
+ }
353
544
  )
354
545
  ]
355
546
  }
@@ -412,29 +603,13 @@ var NotificationPanel = ({
412
603
  Box,
413
604
  {
414
605
  flexDirection: "row",
415
- alignSelf: closeButtonAlign === "top" ? "stretch" : "center",
416
- alignItems: closeButtonAlign === "top" ? "flex-start" : "center",
417
- justifyContent: "flex-start",
418
- paddingVertical: closeButtonAlign === "top" ? 4 : 0,
606
+ alignSelf: closeButtonAlign === "top" ? "flex-start" : void 0,
607
+ alignItems: "center",
608
+ flexShrink: 0,
419
609
  gap: config.buttonsGap,
420
610
  children: [
421
- (0, import_react.isValidElement)(actionButton) && (0, import_react.cloneElement)(actionButton, {
422
- size: "xs",
423
- variant: "tertiary",
424
- tone: "mono"
425
- }),
426
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
427
- import_xui_button.IconButton,
428
- {
429
- variant: "tertiary",
430
- tone: "mono",
431
- size: "xs",
432
- onPress: onClose,
433
- "aria-label": "Close notification",
434
- icon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_xui_icons_base.Remove, { size: 18 }),
435
- hoverBackground: "none"
436
- }
437
- )
611
+ renderActionButton(),
612
+ renderCloseButton(config.notificationCloseIconSize)
438
613
  ]
439
614
  }
440
615
  )