@pnkx-lib/ui 1.9.230 → 1.9.232
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/es/ui/Modal.js +14 -1
- package/package.json +1 -1
- package/types/components/ui/Modal.d.ts +2 -1
package/es/ui/Modal.js
CHANGED
|
@@ -2,12 +2,25 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Modal as Modal$1 } from 'antd';
|
|
3
3
|
import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const widthMap = {
|
|
6
|
+
xs: 400,
|
|
7
|
+
sm: 520,
|
|
8
|
+
md: 820,
|
|
9
|
+
lg: 966,
|
|
10
|
+
xl: 1254
|
|
11
|
+
};
|
|
12
|
+
const Modal = ({
|
|
13
|
+
children,
|
|
14
|
+
className,
|
|
15
|
+
size = "sm",
|
|
16
|
+
...rest
|
|
17
|
+
}) => {
|
|
6
18
|
return /* @__PURE__ */ jsx(
|
|
7
19
|
Modal$1,
|
|
8
20
|
{
|
|
9
21
|
maskClosable: false,
|
|
10
22
|
centered: true,
|
|
23
|
+
width: widthMap[size],
|
|
11
24
|
...rest,
|
|
12
25
|
className: twMerge("pnkx-default-modal", className),
|
|
13
26
|
children
|
package/package.json
CHANGED
|
@@ -2,5 +2,6 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { ModalProps as ModalPropsAntd } from 'antd';
|
|
3
3
|
export interface ModalProps extends ModalPropsAntd {
|
|
4
4
|
children?: ReactNode;
|
|
5
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
5
6
|
}
|
|
6
|
-
export declare const Modal: ({ children, className, ...rest }: ModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Modal: ({ children, className, size, ...rest }: ModalProps) => import("react/jsx-runtime").JSX.Element;
|