react-better-html 1.1.129 → 1.1.130
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/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2232,6 +2232,7 @@ var StyledDiv2 = import_styled_components6.default.div.withConfig({
|
|
|
2232
2232
|
}
|
|
2233
2233
|
}
|
|
2234
2234
|
`;
|
|
2235
|
+
var minWidth = 250;
|
|
2235
2236
|
var updateInterval = 20;
|
|
2236
2237
|
var getAnimationInName = (position) => ({
|
|
2237
2238
|
left: "fadeInFromLeft",
|
|
@@ -2349,7 +2350,9 @@ function Alert2({ alert }) {
|
|
|
2349
2350
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StyledDiv2, { theme: theme2, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2350
2351
|
Div_default.box,
|
|
2351
2352
|
{
|
|
2352
|
-
|
|
2353
|
+
width: "fit-content",
|
|
2354
|
+
maxWidth: Math.max(minWidth, pluginConfig.maxWidth ?? defaultAlertsPluginOptions.maxWidth),
|
|
2355
|
+
minWidth,
|
|
2353
2356
|
boxShadow: "0px 10px 20px #00000020",
|
|
2354
2357
|
onMouseEnter,
|
|
2355
2358
|
onMouseMove: onMouseEnter,
|
|
@@ -2379,7 +2382,7 @@ function Alert2({ alert }) {
|
|
|
2379
2382
|
),
|
|
2380
2383
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
2381
2384
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text_default, { fontSize: 18, fontWeight: 700, children: alert.title ?? alertData[alert.type].title }),
|
|
2382
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text_default, {
|
|
2385
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text_default, { color: theme2.colors.textSecondary, children: alert.message })
|
|
2383
2386
|
] }),
|
|
2384
2387
|
pluginConfig.withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Button_default.icon, { icon: "XMark", alignSelf: "flex-start", onClick: onClickCloseAlert })
|
|
2385
2388
|
] }),
|
|
@@ -2429,6 +2432,7 @@ function AlertsHolder() {
|
|
|
2429
2432
|
left,
|
|
2430
2433
|
right,
|
|
2431
2434
|
gap: theme2.styles.gap,
|
|
2435
|
+
alignItems: pluginConfig.align === "center" ? "center" : pluginConfig.align === "right" ? "flex-end" : void 0,
|
|
2432
2436
|
transform: pluginConfig.align === "center" ? "translateX(-50%)" : void 0,
|
|
2433
2437
|
children: alerts.map((alert) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Alert_default, { alert }, alert.id))
|
|
2434
2438
|
}
|