@movalib/movalib-commons 1.0.76 → 1.0.77
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/src/MovaDialog.d.ts +2 -0
- package/dist/src/MovaDialog.js +2 -2
- package/package.json +1 -1
- package/src/MovaDialog.tsx +5 -3
package/dist/src/MovaDialog.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material';
|
|
1
2
|
import type { CSSProperties, FC } from 'react';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
interface MovaDialogProps {
|
|
@@ -12,6 +13,7 @@ interface MovaDialogProps {
|
|
|
12
13
|
leafImageColor?: "green" | "yellow" | "pink";
|
|
13
14
|
title?: string;
|
|
14
15
|
titleStyle?: CSSProperties;
|
|
16
|
+
sx?: SxProps<Theme>;
|
|
15
17
|
}
|
|
16
18
|
declare const MovaDialog: FC<MovaDialogProps>;
|
|
17
19
|
export default MovaDialog;
|
package/dist/src/MovaDialog.js
CHANGED
|
@@ -22,7 +22,7 @@ var leaf_green_large_png_1 = __importDefault(require("./assets/images/leaf_green
|
|
|
22
22
|
var leaf_yellow_large_png_1 = __importDefault(require("./assets/images/leaf_yellow_large.png"));
|
|
23
23
|
var leaf_pink_large_png_1 = __importDefault(require("./assets/images/leaf_pink_large.png"));
|
|
24
24
|
var MovaDialog = function (_a) {
|
|
25
|
-
var fullScreen = _a.fullScreen, open = _a.open, onClose = _a.onClose, _b = _a.closable, closable = _b === void 0 ? false : _b, children = _a.children, title = _a.title, titleStyle = _a.titleStyle, message = _a.message, leafImageColor = _a.leafImageColor, transition = _a.transition, actions = _a.actions;
|
|
25
|
+
var fullScreen = _a.fullScreen, open = _a.open, onClose = _a.onClose, _b = _a.closable, closable = _b === void 0 ? false : _b, children = _a.children, title = _a.title, titleStyle = _a.titleStyle, message = _a.message, leafImageColor = _a.leafImageColor, transition = _a.transition, actions = _a.actions, sx = _a.sx;
|
|
26
26
|
var getTransition = function () {
|
|
27
27
|
switch (transition) {
|
|
28
28
|
case "fade":
|
|
@@ -51,7 +51,7 @@ var MovaDialog = function (_a) {
|
|
|
51
51
|
onClose();
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, __assign({ fullScreen: fullScreen, fullWidth: true, TransitionComponent: getTransition(), open: open, "aria-labelledby": "garage-dialog-title", "aria-describedby": "garage-dialog-description", onClose: handleOnClose, sx: { textAlign: 'center' } }, { children: [(0, jsx_runtime_1.jsx)("img", { src: getLeafImage(), style: {
|
|
54
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, __assign({ fullScreen: fullScreen, fullWidth: true, TransitionComponent: getTransition(), open: open, "aria-labelledby": "garage-dialog-title", "aria-describedby": "garage-dialog-description", onClose: handleOnClose, sx: __assign(__assign({}, sx), { textAlign: 'center' }) }, { children: [(0, jsx_runtime_1.jsx)("img", { src: getLeafImage(), style: {
|
|
55
55
|
position: 'absolute',
|
|
56
56
|
float: 'left',
|
|
57
57
|
width: '150px',
|
package/package.json
CHANGED
package/src/MovaDialog.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Alert, AppBar, Dialog, DialogActions, DialogContent, DialogTitle, Fade, IconButton, Toolbar, Typography } from '@mui/material';
|
|
1
|
+
import { Alert, AppBar, Dialog, DialogActions, DialogContent, DialogTitle, Fade, IconButton, Toolbar, Typography, SxProps, Theme } from '@mui/material';
|
|
2
2
|
import type { CSSProperties, FC } from 'react';
|
|
3
3
|
import BackIcon from '@mui/icons-material/ArrowBackIosNewRounded';
|
|
4
4
|
import React from 'react';
|
|
@@ -19,9 +19,11 @@ interface MovaDialogProps {
|
|
|
19
19
|
leafImageColor?: "green" | "yellow" | "pink",
|
|
20
20
|
title?: string,
|
|
21
21
|
titleStyle?: CSSProperties;
|
|
22
|
+
sx?: SxProps<Theme>;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
const MovaDialog: FC<MovaDialogProps> = ({fullScreen, open, onClose, closable = false, children, title, titleStyle,
|
|
25
|
+
const MovaDialog: FC<MovaDialogProps> = ({fullScreen, open, onClose, closable = false, children, title, titleStyle,
|
|
26
|
+
message, leafImageColor, transition, actions, sx}) => {
|
|
25
27
|
|
|
26
28
|
const getTransition = () => {
|
|
27
29
|
switch(transition){
|
|
@@ -72,7 +74,7 @@ const MovaDialog: FC<MovaDialogProps> = ({fullScreen, open, onClose, closable =
|
|
|
72
74
|
aria-labelledby="garage-dialog-title"
|
|
73
75
|
aria-describedby="garage-dialog-description"
|
|
74
76
|
onClose={handleOnClose}
|
|
75
|
-
sx={{ textAlign:'center'}}
|
|
77
|
+
sx={{ ...sx, textAlign:'center'}}
|
|
76
78
|
>
|
|
77
79
|
<img src={getLeafImage()} style={{
|
|
78
80
|
position: 'absolute',
|