Fixed account deletion test

This commit is contained in:
zomars committed 2022-09-15 13:10:41 +01:00
1 parent 8da31cb293
commit 26e07bc2d8
3 files changed
+19 -4

No files matched your search

+2
View File
@@ -65,6 +65,7 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonPr
loading = false,
color = "primary",
size = "base",
type = "button",
StartIcon,
EndIcon,
shallow,
@@ -82,6 +83,7 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonPr
{
...passThroughProps,
disabled,
type: !isLink ? type : undefined,
ref: forwardedRef,
className: classNames(
// base styles independent what type of button it is
+8 -3
View File
@@ -73,10 +73,11 @@ type DialogContentProps = React.ComponentProps<typeof DialogPrimitive["Content"]
useOwnActionButtons?: boolean;
actionOnClick?: (e: Event | React.MouseEvent<HTMLElement, MouseEvent>) => void;
actionOnClose?: () => void;
actionProps?: React.ComponentProps<typeof Button>;
};
export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps>(
({ children, Icon, ...props }, forwardedRef) => (
({ children, Icon, actionProps, ...props }, forwardedRef) => (
<DialogPrimitive.Portal>
<DialogPrimitive.Overlay className="fadeIn fixed inset-0 z-40 bg-gray-500 bg-opacity-75 transition-opacity" />
{/*zIndex one less than Toast */}
@@ -125,11 +126,15 @@ export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps
</Button>
</DialogClose>
{props.actionOnClick ? (
<Button color="primary" disabled={props.actionDisabled} onClick={props.actionOnClick}>
<Button
color="primary"
disabled={props.actionDisabled}
onClick={props.actionOnClick}
{...actionProps}>
{props.actionText}
</Button>
) : (
<Button color="primary" type="submit" disabled={props.actionDisabled}>
<Button color="primary" type="submit" disabled={props.actionDisabled} {...actionProps}>
{props.actionText}
</Button>
)}