@ttoss/components 1.21.0 → 1.21.1
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/esm/index.js +7 -3
- package/dist/index.js +7 -3
- package/package.json +2 -2
- package/src/components/Toast/Toast.tsx +6 -1
package/dist/esm/index.js
CHANGED
|
@@ -172,15 +172,19 @@ var Modal = (props) => {
|
|
|
172
172
|
Modal.setAppElement = ReactModal.setAppElement;
|
|
173
173
|
|
|
174
174
|
// src/components/Toast/Toast.tsx
|
|
175
|
+
import * as React4 from "react";
|
|
175
176
|
import { Box as Box2 } from "@ttoss/ui";
|
|
176
177
|
import {
|
|
177
178
|
ToastContainer as ReactToastifyToastContainer,
|
|
178
179
|
ToastContainerProps,
|
|
179
180
|
toast
|
|
180
181
|
} from "react-toastify";
|
|
181
|
-
import "react-toastify/dist/
|
|
182
|
+
import { injectStyle } from "react-toastify/dist/inject-style";
|
|
182
183
|
var ToastContainer = (props) => {
|
|
183
|
-
|
|
184
|
+
React4.useEffect(() => {
|
|
185
|
+
injectStyle();
|
|
186
|
+
}, []);
|
|
187
|
+
return /* @__PURE__ */ React4.createElement(Box2, {
|
|
184
188
|
sx: ({ colors, fonts }) => ({
|
|
185
189
|
"--toastify-color-light": "#fff",
|
|
186
190
|
"--toastify-color-dark": "#121212",
|
|
@@ -191,7 +195,7 @@ var ToastContainer = (props) => {
|
|
|
191
195
|
"--toastify-color-progress-light": `linear-gradient(to right, ${colors == null ? void 0 : colors.primary}, ${colors == null ? void 0 : colors.secondary})`,
|
|
192
196
|
"--toastify-font-family": fonts.body
|
|
193
197
|
})
|
|
194
|
-
}, /* @__PURE__ */
|
|
198
|
+
}, /* @__PURE__ */ React4.createElement(ReactToastifyToastContainer, {
|
|
195
199
|
...props
|
|
196
200
|
}));
|
|
197
201
|
};
|
package/dist/index.js
CHANGED
|
@@ -198,11 +198,15 @@ var Modal = (props) => {
|
|
|
198
198
|
Modal.setAppElement = import_react_modal.default.setAppElement;
|
|
199
199
|
|
|
200
200
|
// src/components/Toast/Toast.tsx
|
|
201
|
+
var React4 = __toESM(require("react"));
|
|
201
202
|
var import_ui4 = require("@ttoss/ui");
|
|
202
203
|
var import_react_toastify = require("react-toastify");
|
|
203
|
-
var
|
|
204
|
+
var import_inject_style = require("react-toastify/dist/inject-style");
|
|
204
205
|
var ToastContainer = (props) => {
|
|
205
|
-
|
|
206
|
+
React4.useEffect(() => {
|
|
207
|
+
(0, import_inject_style.injectStyle)();
|
|
208
|
+
}, []);
|
|
209
|
+
return /* @__PURE__ */ React4.createElement(import_ui4.Box, {
|
|
206
210
|
sx: ({ colors, fonts }) => ({
|
|
207
211
|
"--toastify-color-light": "#fff",
|
|
208
212
|
"--toastify-color-dark": "#121212",
|
|
@@ -213,7 +217,7 @@ var ToastContainer = (props) => {
|
|
|
213
217
|
"--toastify-color-progress-light": `linear-gradient(to right, ${colors == null ? void 0 : colors.primary}, ${colors == null ? void 0 : colors.secondary})`,
|
|
214
218
|
"--toastify-font-family": fonts.body
|
|
215
219
|
})
|
|
216
|
-
}, /* @__PURE__ */
|
|
220
|
+
}, /* @__PURE__ */ React4.createElement(import_react_toastify.ToastContainer, {
|
|
217
221
|
...props
|
|
218
222
|
}));
|
|
219
223
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/components",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.1",
|
|
4
4
|
"description": "React components.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"publishConfig": {
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"@types/jest": "^28.1.5",
|
|
50
50
|
"jest": "^28.1.3"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "db9d943fedab3b0e2fab1752e9436130fdb351fa"
|
|
53
53
|
}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { Box } from '@ttoss/ui';
|
|
2
3
|
import {
|
|
3
4
|
ToastContainer as ReactToastifyToastContainer,
|
|
4
5
|
ToastContainerProps,
|
|
5
6
|
toast,
|
|
6
7
|
} from 'react-toastify';
|
|
7
|
-
import 'react-toastify/dist/
|
|
8
|
+
import { injectStyle } from 'react-toastify/dist/inject-style';
|
|
8
9
|
|
|
9
10
|
export { toast, ToastContainerProps };
|
|
10
11
|
|
|
11
12
|
export const ToastContainer = (props: ToastContainerProps) => {
|
|
13
|
+
React.useEffect(() => {
|
|
14
|
+
injectStyle();
|
|
15
|
+
}, []);
|
|
16
|
+
|
|
12
17
|
return (
|
|
13
18
|
<Box
|
|
14
19
|
sx={({ colors, fonts }) => ({
|