feat: migrate AlertDialog and Drawer with reviewed overlay lifecycles
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import {
|
||||
type AlertDialogContainerProps,
|
||||
type AlertDialogIconProps,
|
||||
type AlertDialogBackdropProps,
|
||||
type DrawerContentProps,
|
||||
type DrawerBackdropProps,
|
||||
DrawerHandle,
|
||||
AlertDialog,
|
||||
} from "@heroui-vue/components";
|
||||
const size: AlertDialogContainerProps = { size: "cover", placement: "bottom" };
|
||||
const status: AlertDialogIconProps = { status: "danger" };
|
||||
const backdrop: AlertDialogBackdropProps = {
|
||||
isDismissable: false,
|
||||
isKeyboardDismissDisabled: true,
|
||||
};
|
||||
const drawer: DrawerContentProps = { placement: "left" };
|
||||
const state: DrawerBackdropProps = {
|
||||
open: true,
|
||||
"onUpdate:open": (v: boolean) => {
|
||||
void v;
|
||||
},
|
||||
};
|
||||
// @ts-expect-error placement is constrained
|
||||
const invalidDirection: DrawerContentProps = { placement: "diagonal" };
|
||||
// @ts-expect-error size is constrained
|
||||
const invalidSize: AlertDialogContainerProps = { size: "giant" };
|
||||
// @ts-expect-error dismiss policy must remain Boolean
|
||||
const invalidPolicy: AlertDialogBackdropProps = { isDismissable: "false" };
|
||||
void [
|
||||
size,
|
||||
status,
|
||||
backdrop,
|
||||
drawer,
|
||||
state,
|
||||
invalidDirection,
|
||||
invalidSize,
|
||||
invalidPolicy,
|
||||
DrawerHandle,
|
||||
AlertDialog,
|
||||
];
|
||||
Reference in New Issue
Block a user