@team-monolith/cds 1.109.1 → 1.109.2
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.
|
@@ -13,6 +13,8 @@ export interface AlertDialogOwnProps<RootComponentType extends React.ElementType
|
|
|
13
13
|
icon?: React.ReactNode;
|
|
14
14
|
/** 전달시 아이콘 패딩이 비활성화 됩니다. */
|
|
15
15
|
disableIconPadding?: boolean;
|
|
16
|
+
/** Modal의 zindex를 직접 전달합니다. 미전달시 기본값(ZINDEX.ALERT = 700)이 사용됩니다. */
|
|
17
|
+
zIndex?: number;
|
|
16
18
|
}
|
|
17
19
|
export type AlertDialogProps<RootComponentType extends React.ElementType = AlertDialogTypeMap["defaultComponent"]> = PolymorphicProps<AlertDialogTypeMap<RootComponentType>, RootComponentType>;
|
|
18
20
|
export interface AlertDialogTypeMap<RootComponentType extends React.ElementType = "div"> {
|
|
@@ -20,11 +20,11 @@ import { AlertDialogContext } from "./AlertDialogContext";
|
|
|
20
20
|
import { ZINDEX } from "../../utils/zIndex";
|
|
21
21
|
import { Modal } from "../..";
|
|
22
22
|
export const AlertDialog = React.forwardRef(function AlertDialog(props, ref) {
|
|
23
|
-
const { className, component: Component = "div", open, onClose, children, icon, disableIconPadding } = props, other = __rest(props, ["className", "component", "open", "onClose", "children", "icon", "disableIconPadding"]);
|
|
23
|
+
const { className, component: Component = "div", open, onClose, children, icon, disableIconPadding, zIndex } = props, other = __rest(props, ["className", "component", "open", "onClose", "children", "icon", "disableIconPadding", "zIndex"]);
|
|
24
24
|
const theme = useTheme();
|
|
25
25
|
const paddingAreaName = disableIconPadding ? "content" : "iconPadding";
|
|
26
26
|
return (_jsx(Modal, Object.assign({ open: open, onClose: onClose, ref: ref, sx: {
|
|
27
|
-
zIndex: ZINDEX.ALERT,
|
|
27
|
+
zIndex: zIndex !== null && zIndex !== void 0 ? zIndex : ZINDEX.ALERT,
|
|
28
28
|
} }, other, { children: _jsxs(Component, { className: className, css: css `
|
|
29
29
|
width: 480px;
|
|
30
30
|
max-height: calc(100% - 48px);
|