@algorithm-shift/design-system 1.2.998 → 1.2.999
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.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4853,6 +4853,34 @@ function showSonnerToast({
|
|
|
4853
4853
|
toast(title, options);
|
|
4854
4854
|
}
|
|
4855
4855
|
}
|
|
4856
|
+
function showConfirmToast({
|
|
4857
|
+
title,
|
|
4858
|
+
description,
|
|
4859
|
+
confirmLabel = "Confirm",
|
|
4860
|
+
cancelLabel = "Cancel"
|
|
4861
|
+
}) {
|
|
4862
|
+
return new Promise((resolve) => {
|
|
4863
|
+
const id = toast(title, {
|
|
4864
|
+
description,
|
|
4865
|
+
duration: Infinity,
|
|
4866
|
+
closeButton: false,
|
|
4867
|
+
action: {
|
|
4868
|
+
label: confirmLabel,
|
|
4869
|
+
onClick: () => {
|
|
4870
|
+
resolve(true);
|
|
4871
|
+
toast.dismiss(id);
|
|
4872
|
+
}
|
|
4873
|
+
},
|
|
4874
|
+
cancel: {
|
|
4875
|
+
label: cancelLabel,
|
|
4876
|
+
onClick: () => {
|
|
4877
|
+
resolve(false);
|
|
4878
|
+
toast.dismiss(id);
|
|
4879
|
+
}
|
|
4880
|
+
}
|
|
4881
|
+
});
|
|
4882
|
+
});
|
|
4883
|
+
}
|
|
4856
4884
|
|
|
4857
4885
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
4858
4886
|
import { Fragment as Fragment22, jsx as jsx59, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
@@ -6300,6 +6328,7 @@ export {
|
|
|
6300
6328
|
UrlInput_default as URL,
|
|
6301
6329
|
cn,
|
|
6302
6330
|
getInitials,
|
|
6331
|
+
showConfirmToast,
|
|
6303
6332
|
showSonnerToast
|
|
6304
6333
|
};
|
|
6305
6334
|
//# sourceMappingURL=index.mjs.map
|