pmg-ui-kit 0.0.46 → 0.0.48
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/dist/icons/BackIcon.d.ts +8 -0
- package/dist/icons/BackIcon.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/ui/atoms/Modal.d.ts +2 -1
- package/dist/ui/atoms/Modal.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const BackIcon = ({ onClick, width = 24, height = 24, color = "currentColor" }) => (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", onClick: onClick, className: "icon icon-tabler icons-tabler-outline icon-tabler-chevrons-left", children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M11 7l-5 5l5 5" }), _jsx("path", { d: "M17 7l-5 5l5 5" })] }));
|
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export * from './icons/ArchiveBoxIcon';
|
|
|
33
33
|
export * from './icons/ArrowIcon';
|
|
34
34
|
export * from './icons/ArrowTopRightIcon';
|
|
35
35
|
export * from './icons/ArrowUpCircleIcon';
|
|
36
|
+
export * from './icons/BackIcon';
|
|
36
37
|
export * from './icons/CheckboxIcon';
|
|
37
38
|
export * from './icons/CheckCircleIcon';
|
|
38
39
|
export * from './icons/CheckGreenIcon';
|
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ export * from './icons/ArchiveBoxIcon';
|
|
|
33
33
|
export * from './icons/ArrowIcon';
|
|
34
34
|
export * from './icons/ArrowTopRightIcon';
|
|
35
35
|
export * from './icons/ArrowUpCircleIcon';
|
|
36
|
+
export * from './icons/BackIcon';
|
|
36
37
|
export * from './icons/CheckboxIcon';
|
|
37
38
|
export * from './icons/CheckCircleIcon';
|
|
38
39
|
export * from './icons/CheckGreenIcon';
|
package/dist/ui/atoms/Modal.d.ts
CHANGED
|
@@ -10,7 +10,8 @@ type ModalProps = {
|
|
|
10
10
|
cancelBtnLabel?: string;
|
|
11
11
|
cancelBtnClassname?: string;
|
|
12
12
|
hideButtons?: boolean;
|
|
13
|
+
moveBtnsToRight?: boolean;
|
|
13
14
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl";
|
|
14
15
|
};
|
|
15
|
-
export declare const Modal: ({ show, handleOnClose, handleOnAccept, header, content, okBtnLabel, okBtnClassname, cancelBtnLabel, cancelBtnClassname, hideButtons, size }: ModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const Modal: ({ show, handleOnClose, handleOnAccept, header, content, okBtnLabel, okBtnClassname, cancelBtnLabel, cancelBtnClassname, hideButtons, moveBtnsToRight, size }: ModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export {};
|
package/dist/ui/atoms/Modal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Modal as FlowbiteModal } from "flowbite-react";
|
|
3
3
|
import { Button } from "./Button";
|
|
4
|
-
export const Modal = ({ show, handleOnClose, handleOnAccept, header, content, okBtnLabel = "Ok", okBtnClassname, cancelBtnLabel = "Cancel", cancelBtnClassname, hideButtons = false, size = "xl" }) => {
|
|
4
|
+
export const Modal = ({ show, handleOnClose, handleOnAccept, header, content, okBtnLabel = "Ok", okBtnClassname, cancelBtnLabel = "Cancel", cancelBtnClassname, hideButtons = false, moveBtnsToRight = false, size = "xl" }) => {
|
|
5
5
|
return (_jsxs(FlowbiteModal, { show: show, onClose: () => handleOnClose(), size: size, children: [_jsx(FlowbiteModal.Header, { children: header }), _jsx(FlowbiteModal.Body, { children: content }), !hideButtons &&
|
|
6
|
-
_jsxs(FlowbiteModal.Footer, { className:
|
|
6
|
+
_jsxs(FlowbiteModal.Footer, { className: `flex ${moveBtnsToRight ? 'justify-end gap-2' : 'justify-between'}`, children: [_jsx(Button, { type: "b-default", className: cancelBtnClassname, onClick: () => handleOnClose(), text: cancelBtnLabel }), _jsx(Button, { type: "b-primary", className: okBtnClassname, onClick: () => handleOnAccept(), text: okBtnLabel })] })] }));
|
|
7
7
|
};
|