@symply.io/basic-components 1.3.11-alpha.8 → 1.3.11-alpha.9
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/ToastPrompt/Prompt.js +2 -2
- package/ToastPrompt/index.js +3 -3
- package/package.json +1 -1
package/ToastPrompt/Prompt.js
CHANGED
@@ -11,9 +11,9 @@ import WarningIcon from "@mui/icons-material/Warning";
|
|
11
11
|
import SuccessIcon from "@mui/icons-material/CheckCircle";
|
12
12
|
import { green, amber, red, blue } from "@mui/material/colors";
|
13
13
|
import useCustomTheme from "../useCustomTheme";
|
14
|
-
|
14
|
+
function Transition(args) {
|
15
15
|
return _jsx(Slide, { ...args, direction: "up" });
|
16
|
-
}
|
16
|
+
}
|
17
17
|
export default function Prompt(props) {
|
18
18
|
const { open, icon, variant, message, timeout, onClose } = props;
|
19
19
|
const theme = useCustomTheme();
|
package/ToastPrompt/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { jsx as _jsx,
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { createContext, useContext } from "react";
|
3
|
-
import Prompt from "./Prompt";
|
3
|
+
import { default as Prompt } from "./Prompt";
|
4
4
|
import useInteractions from "./useInteractions";
|
5
5
|
const PromptContext = createContext({
|
6
6
|
showPrompt: () => { }
|
@@ -8,7 +8,7 @@ const PromptContext = createContext({
|
|
8
8
|
export function PromptProvider(props) {
|
9
9
|
const { children } = props;
|
10
10
|
const { promptArgs, onShow, onHide } = useInteractions();
|
11
|
-
return (
|
11
|
+
return (_jsxs(PromptContext.Provider, { value: { showPrompt: onShow }, children: [children, _jsx(Prompt, { ...promptArgs, onClose: onHide })] }));
|
12
12
|
}
|
13
13
|
export function usePrompt() {
|
14
14
|
return useContext(PromptContext);
|