Skip to content

Commit ea9ee0f

Browse files
committed
fix toast ID release
1 parent f764725 commit ea9ee0f

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

dist/gooey.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11124,7 +11124,7 @@ function bl() {
1112411124
};
1112511125
}
1112611126
function Am(e) {
11127-
const t = Em(), n = (a) => ln({
11127+
const t = e.id ?? Em(), n = (a) => ln({
1112811128
type: at.UPDATE_TOAST,
1112911129
toast: { ...a, id: t }
1113011130
}), o = () => ln({ type: at.DISMISS_TOAST, toastId: t });
@@ -13934,18 +13934,22 @@ const G0 = /* @__PURE__ */ x({
1393413934
}), Ov = { class: "flex items-center justify-between space-y-2" }, Ev = { class: "flex items-center space-x-2" }, q0 = /* @__PURE__ */ x({
1393513935
__name: "Heading",
1393613936
props: {
13937-
as: { default: "h2" }
13937+
as: { default: "h2" },
13938+
class: {}
1393813939
},
1393913940
setup(e) {
13940-
return (t, n) => (h(), N("div", Ov, [
13941-
(h(), C(Ve(t.as), { class: "text-3xl font-bold tracking-tight" }, {
13941+
const t = e;
13942+
return (n, o) => (h(), N("div", Ov, [
13943+
(h(), C(Ve(n.as), {
13944+
class: ne(s(z)("text-3xl font-bold tracking-tight", t.class))
13945+
}, {
1394213946
default: y(() => [
13943-
_(t.$slots, "default")
13947+
_(n.$slots, "default")
1394413948
]),
1394513949
_: 3
13946-
})),
13950+
}, 8, ["class"])),
1394713951
re("div", Ev, [
13948-
_(t.$slots, "actions")
13952+
_(n.$slots, "actions")
1394913953
])
1395013954
]));
1395113955
}

dist/gooey.umd.cjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codinglabsau/gooey",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"type": "module",
55
"files": [
66
"dist",

src/components/toast/use-toast.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ function useToast() {
137137

138138
// type Toast = Omit<ToasterToast, "id">
139139
type Toast = Omit<ToasterToast, "id"> & {
140-
id?: string; // id is optional to allow for server-side ID tracking
141-
};
140+
id?: string // id is optional to allow for server-side ID tracking
141+
}
142142

143143
function toast(props: Toast) {
144144
const id = props.id ?? genId()

0 commit comments

Comments
 (0)