-
Notifications
You must be signed in to change notification settings - Fork 13
feat: migrate Toast to Base UI #671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
bb14f2b
5625bda
d599b60
285b477
e075c32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,73 +1,85 @@ | ||
| 'use client'; | ||
|
|
||
| import { Button, Flex, ToastContainer, toast } from '@raystack/apsara'; | ||
| import { Button, Flex, Toast, toastManager } from '@raystack/apsara'; | ||
| import PlaygroundLayout from './playground-layout'; | ||
|
|
||
| export function ToastExamples() { | ||
| return ( | ||
| <PlaygroundLayout title='Toast'> | ||
| <ToastContainer /> | ||
| <Flex gap='large' wrap='wrap'> | ||
| <Button | ||
| onClick={() => | ||
| toast.success('This is a toast', { position: 'bottom-left' }) | ||
| } | ||
| > | ||
| Bottom Left Toast | ||
| </Button> | ||
| <Button | ||
| onClick={() => | ||
| toast.success('This is a toast', { position: 'bottom-center' }) | ||
| } | ||
| > | ||
| Bottom Center Toast | ||
| </Button> | ||
| <Button | ||
| onClick={() => | ||
| toast.success('This is a toast', { position: 'bottom-right' }) | ||
| } | ||
| > | ||
| Bottom Right Toast | ||
| </Button> | ||
| </Flex> | ||
| <Flex gap='large' wrap='wrap'> | ||
| <Button | ||
| onClick={() => | ||
| toast.success('This is a toast', { position: 'top-left' }) | ||
| } | ||
| > | ||
| Top Left Toast | ||
| </Button> | ||
| <Button | ||
| onClick={() => | ||
| toast.success('This is a toast', { position: 'top-center' }) | ||
| } | ||
| > | ||
| Top Center Toast | ||
| </Button> | ||
| <Button | ||
| onClick={() => | ||
| toast.success('This is a toast', { position: 'top-right' }) | ||
| } | ||
| > | ||
| Top Right Toast | ||
| </Button> | ||
| </Flex> | ||
| <Button | ||
| variant='outline' | ||
| onClick={() => | ||
| toast.success('Data loaded successfully.', { | ||
| dismissible: true, | ||
| action: ( | ||
| <Button size='small' onClick={() => console.log('Toast appears')}> | ||
| Click Me | ||
| </Button> | ||
| ) | ||
| }) | ||
| } | ||
| > | ||
| Action Toast | ||
| </Button> | ||
| <Toast.Provider position='bottom-right'> | ||
| <Flex gap='large' wrap='wrap'> | ||
| <Button | ||
| onClick={() => | ||
| toastManager.add({ title: 'Success toast', type: 'success' }) | ||
| } | ||
| > | ||
| Success Toast | ||
| </Button> | ||
| <Button | ||
| onClick={() => | ||
| toastManager.add({ title: 'Error toast', type: 'error' }) | ||
| } | ||
| > | ||
| Error Toast | ||
| </Button> | ||
| <Button | ||
| onClick={() => | ||
| toastManager.add({ title: 'Warning toast', type: 'warning' }) | ||
| } | ||
| > | ||
| Warning Toast | ||
| </Button> | ||
| <Button | ||
| onClick={() => | ||
| toastManager.add({ title: 'Info toast', type: 'info' }) | ||
| } | ||
| > | ||
| Info Toast | ||
| </Button> | ||
| </Flex> | ||
| <Flex gap='large' wrap='wrap'> | ||
| <Button | ||
| onClick={() => | ||
| toastManager.add({ | ||
| title: 'With description', | ||
| description: 'This toast has a title and a description.', | ||
| type: 'success' | ||
| }) | ||
| } | ||
| > | ||
| Description Toast | ||
| </Button> | ||
| <Button | ||
| onClick={() => | ||
| toastManager.add({ | ||
| title: 'Item deleted', | ||
| description: '1 item was moved to trash.', | ||
| actionProps: { | ||
| children: 'Undo', | ||
| onClick: () => console.log('Undo clicked') | ||
| } | ||
| }) | ||
| } | ||
| > | ||
| Action Toast | ||
| </Button> | ||
| <Button | ||
| variant='outline' | ||
| onClick={() => | ||
| toastManager.promise( | ||
| new Promise(resolve => setTimeout(resolve, 2000)), | ||
| { | ||
| loading: 'Loading...', | ||
| success: 'Done!', | ||
| error: 'Failed!' | ||
| } | ||
| ) | ||
| } | ||
| > | ||
| Promise Toast | ||
| </Button> | ||
| </Flex> | ||
| </Toast.Provider> | ||
| </PlaygroundLayout> | ||
| ); | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,13 +3,201 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||
| export const preview = { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| type: 'code', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| function ToastTest(){ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return <div> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <ToastContainer /> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button | ||||||||||||||||||||||||||||||||||||||||||||||||||
| onClick={() => toast.success("This is a toast")}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Trigger toast | ||||||||||||||||||||||||||||||||||||||||||||||||||
| function ToastPreview() { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Toast.Provider> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Flex gap="medium" wrap="wrap"> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ title: "This is a toast", type: "success" })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Trigger toast | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Flex> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Toast.Provider> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| export const basicDemo = { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| type: 'code', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ title: "Hello from Apsara!" })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Show toast | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| export const typesDemo = { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| type: 'code', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| tabs: [ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| name: 'Success', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ title: "Saved successfully", type: "success" })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Success | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| name: 'Error', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ title: "Something went wrong", type: "error" })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Error | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| name: 'Warning', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ title: "Heads up!", type: "warning" })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Warning | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| name: 'Info', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ title: "FYI: System update available", type: "info" })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Info | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| name: 'Loading', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ title: "Processing...", type: "loading", timeout: 0 })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Loading | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| export const descriptionDemo = { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| type: 'code', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Flex gap="medium" wrap="wrap"> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| title: "File uploaded", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| description: "Your document has been uploaded successfully.", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| type: "success" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| With description | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| title: "Connection lost", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| description: "Please check your internet connection and try again.", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| type: "error" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Error with description | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Flex>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| export const actionDemo = { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| type: 'code', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| title: "Item deleted", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| description: "1 item was moved to trash.", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| actionProps: { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| children: "Undo", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| onClick: () => toastManager.add({ title: "Item restored", type: "success" }) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Action toast | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| export const promiseDemo = { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| type: 'code', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| tabs: [ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| name: 'Basic', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| const promise = new Promise((resolve) => setTimeout(resolve, 2000)); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| toastManager.promise(promise, { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| loading: "Loading data...", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| success: "Data loaded successfully!", | ||||||||||||||||||||||||||||||||||||||||||||||||||
| error: "Failed to load data." | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Promise toast | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| name: 'With options', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| const promise = new Promise((resolve) => setTimeout(resolve, 2000)); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| toastManager.promise(promise, { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| loading: { title: "Saving", description: "Please wait..." }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| success: { title: "Saved", description: "Document saved.", type: "success" }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| error: { title: "Failed", description: "Could not save document.", type: "error" } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Promise with options | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| export const positionDemo = { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| type: 'code', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| tabs: [ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| name: 'Bottom Right', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ title: "Bottom right toast" })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Bottom Right | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| name: 'Top Center', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ title: "Top center toast" })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Top Center | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| name: 'Top Right', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ title: "Top right toast" })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Top Right | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| name: 'Bottom Left', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => toastManager.add({ title: "Bottom left toast" })}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Bottom Left | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button>` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| export const updateDemo = { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| type: 'code', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| code: ` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| function UpdateToast() { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| const idRef = React.useRef(null); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Flex gap="medium" wrap="wrap"> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={() => { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| idRef.current = toastManager.add({ title: "Processing...", type: "loading", timeout: 0 }); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+247
to
+249
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't orphan persistent toasts on repeated starts. Line 248 always adds a new Suggested fix <Button onClick={() => {
+ if (idRef.current) return;
idRef.current = toastManager.add({ title: "Processing...", type: "loading", timeout: 0 });
}}>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||
| Start processing | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button variant="outline" onClick={() => { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (idRef.current) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| toastManager.update(idRef.current, { title: "Done!", type: "success", timeout: 3000 }); | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+243
to
+254
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: In React’s TypeScript typings,
So when you write: const ref = useRef(null);TypeScript picks the Yes—you should provide a type if you plan to assign a string later: const ref = useRef<string | null>(null);
ref.current = "hello"; // OK(Alternative: if you know it won’t be null after initialization, you can use Citations:
🏁 Script executed: #!/bin/bash
# Check if the file exists and read the specified lines
if [ -f "apps/www/src/content/docs/components/toast/demo.ts" ]; then
echo "=== File exists ==="
# Get line count to verify range
total_lines=$(wc -l < "apps/www/src/content/docs/components/toast/demo.ts")
echo "Total lines: $total_lines"
# Read lines 175-186
echo ""
echo "=== Lines 175-186 ==="
sed -n '175,186p' "apps/www/src/content/docs/components/toast/demo.ts"
else
echo "File not found at apps/www/src/content/docs/components/toast/demo.ts"
fiRepository: raystack/apsara Length of output: 607 Type
Suggested fix- const idRef = React.useRef(null);
+ const idRef = React.useRef<string | null>(null);📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||
| idRef.current = null; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Mark as done | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button variant="outline" onClick={() => { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (idRef.current) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| toastManager.close(idRef.current); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| idRef.current = null; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }}> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Dismiss | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| </Flex> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }` | ||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.