From e37a75a411c584d3e463662a0219fd342d4247ab Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Thu, 18 Dec 2025 04:26:17 -0600
Subject: feat(desktop): custom update toast
---
packages/ui/src/components/icon.tsx | 1 +
packages/ui/src/components/toast.css | 6 +++---
packages/ui/src/components/toast.tsx | 15 ++++++++++++---
3 files changed, 16 insertions(+), 6 deletions(-)
(limited to 'packages/ui/src')
diff --git a/packages/ui/src/components/icon.tsx b/packages/ui/src/components/icon.tsx
index 94d9544d6..8642be0f8 100644
--- a/packages/ui/src/components/icon.tsx
+++ b/packages/ui/src/components/icon.tsx
@@ -53,6 +53,7 @@ const icons = {
check: ``,
photo: ``,
share: ``,
+ download: ``,
}
export interface IconProps extends ComponentProps<"svg"> {
diff --git a/packages/ui/src/components/toast.css b/packages/ui/src/components/toast.css
index 374dd6523..8f6cf1941 100644
--- a/packages/ui/src/components/toast.css
+++ b/packages/ui/src/components/toast.css
@@ -134,7 +134,7 @@
padding: 0;
cursor: pointer;
- color: var(--text-invert-strong);
+ color: var(--text-invert-weak);
font-family: var(--font-family-sans);
font-size: var(--font-size-base);
font-weight: var(--font-weight-medium);
@@ -145,8 +145,8 @@
text-decoration: underline;
}
- &:last-child {
- color: var(--text-invert-weak);
+ &:first-child {
+ color: var(--text-invert-strong);
}
}
diff --git a/packages/ui/src/components/toast.tsx b/packages/ui/src/components/toast.tsx
index 5869f8a6b..c1a29cd04 100644
--- a/packages/ui/src/components/toast.tsx
+++ b/packages/ui/src/components/toast.tsx
@@ -91,7 +91,7 @@ export type ToastVariant = "default" | "success" | "error" | "loading"
export interface ToastAction {
label: string
- onClick: () => void
+ onClick: "dismiss" | (() => void)
}
export interface ToastOptions {
@@ -100,13 +100,19 @@ export interface ToastOptions {
icon?: IconProps["name"]
variant?: ToastVariant
duration?: number
+ persistent?: boolean
actions?: ToastAction[]
}
export function showToast(options: ToastOptions | string) {
const opts = typeof options === "string" ? { description: options } : options
return toaster.show((props) => (
-
+
@@ -120,7 +126,10 @@ export function showToast(options: ToastOptions | string) {
{opts.actions!.map((action) => (
-