@youngonesworks/ui 0.1.101 → 0.1.103
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/components/alert/index.d.ts +2 -2
- package/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -223,7 +223,7 @@ const Alert = ({ show, title, description, type = "warning", button, plain = fal
|
|
|
223
223
|
};
|
|
224
224
|
const config = typeConfig[type];
|
|
225
225
|
const { bg, iconColor, Icon } = config;
|
|
226
|
-
const descriptionId = description ?
|
|
226
|
+
const descriptionId = description ? "alert-desc" : undefined;
|
|
227
227
|
return /* @__PURE__ */ jsxs("div", {
|
|
228
228
|
role: "alert",
|
|
229
229
|
"aria-live": "assertive",
|
|
@@ -252,11 +252,15 @@ const Alert = ({ show, title, description, type = "warning", button, plain = fal
|
|
|
252
252
|
children: title
|
|
253
253
|
})]
|
|
254
254
|
}),
|
|
255
|
-
description && /* @__PURE__ */ jsx("p", {
|
|
255
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", {
|
|
256
256
|
id: descriptionId,
|
|
257
257
|
className: "text-sm text-color-gray-900",
|
|
258
258
|
children: description
|
|
259
|
-
}),
|
|
259
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
260
|
+
id: descriptionId,
|
|
261
|
+
className: "text-sm text-color-gray-900",
|
|
262
|
+
children: description
|
|
263
|
+
})),
|
|
260
264
|
button && /* @__PURE__ */ jsx("div", { children: button })
|
|
261
265
|
]
|
|
262
266
|
}), closable && /* @__PURE__ */ jsx("button", {
|