mui-drawer 1.0.17 → 1.0.18

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.
@@ -3436,7 +3436,10 @@ const MuiDrawer = (props) => {
3436
3436
  tertiaryCtaTooltipText,
3437
3437
  showPrimaryCtaTooltipMsg = false,
3438
3438
  showSecondaryCtaTooltipMsg = false,
3439
- showTertiaryCtaTooltipMsg = false
3439
+ showTertiaryCtaTooltipMsg = false,
3440
+ primaryCtaButtonProps,
3441
+ secondaryCtaButtonProps,
3442
+ tertiaryCtaButtonProps
3440
3443
  } = actions || {};
3441
3444
  const config = DRAWER_CONFIGS[type][subtype] || DRAWER_CONFIGS[type].default;
3442
3445
  const showFooter = showActions && (primaryCtaTitle || secondaryCtaTitle || tertiaryCtaTitle);
@@ -3543,6 +3546,7 @@ const MuiDrawer = (props) => {
3543
3546
  startIcon: tertiaryCtaStartIcon,
3544
3547
  loading: isTertiaryCtaLoading,
3545
3548
  disabled: isTertiaryCtaDisabled !== void 0 ? isTertiaryCtaDisabled : !!(isPrimaryCtaLoading || isSecondaryCtaLoading),
3549
+ ...tertiaryCtaButtonProps,
3546
3550
  children: tertiaryCtaTitle
3547
3551
  }
3548
3552
  )
@@ -3568,6 +3572,7 @@ const MuiDrawer = (props) => {
3568
3572
  startIcon: secondaryCtaStartIcon,
3569
3573
  loading: isSecondaryCtaLoading,
3570
3574
  disabled: isSecondaryCtaDisabled !== void 0 ? isSecondaryCtaDisabled : !!(isPrimaryCtaLoading || isTertiaryCtaLoading),
3575
+ ...secondaryCtaButtonProps,
3571
3576
  children: secondaryCtaTitle
3572
3577
  }
3573
3578
  )
@@ -3590,6 +3595,7 @@ const MuiDrawer = (props) => {
3590
3595
  onClick: onPrimaryCtaClick,
3591
3596
  loading: isPrimaryCtaLoading,
3592
3597
  disabled: isPrimaryCtaDisabled !== void 0 ? isPrimaryCtaDisabled : !!(isSecondaryCtaLoading || isTertiaryCtaLoading),
3598
+ ...primaryCtaButtonProps,
3593
3599
  children: primaryCtaTitle
3594
3600
  }
3595
3601
  )
@@ -1,4 +1,5 @@
1
1
  import { DrawerProps } from '@mui/material';
2
+ import { LoadingButtonProps } from '@mui/lab/LoadingButton';
2
3
  import { INFORMATION_SUBTYPES, INPUT_SUBTYPES, DRAWER_TYPES, TERTIARY_CTA_TYPES } from './muiDrawer.types';
3
4
  export interface IActions {
4
5
  primaryCtaTitle?: string;
@@ -24,6 +25,9 @@ export interface IActions {
24
25
  isTertiaryCtaLoading?: boolean;
25
26
  isTertiaryCtaDisabled?: boolean;
26
27
  onTertiaryCtaClick?: () => void;
28
+ primaryCtaButtonProps?: Partial<Omit<LoadingButtonProps, "children">>;
29
+ secondaryCtaButtonProps?: Partial<Omit<LoadingButtonProps, "children">>;
30
+ tertiaryCtaButtonProps?: Partial<Omit<LoadingButtonProps, "children">>;
27
31
  }
28
32
  export interface BaseDrawerProps extends DrawerProps {
29
33
  wrapperClassName?: string;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "https://github.com/viplatform/mui-drawer/issues"
8
8
  },
9
9
  "homepage": "https://github.com/viplatform/mui-drawer#readme",
10
- "version": "1.0.17",
10
+ "version": "1.0.18",
11
11
  "files": [
12
12
  "dist"
13
13
  ],