project/medusa-foundation-audit
| 1 | import { Button, toast } from "@medusajs/ui" |
| 2 | |
| 3 | export default function ToasterWithAction() { |
| 4 | return ( |
| 5 | <Button |
| 6 | onClick={() => |
| 7 | toast.success("Created Product", { |
| 8 | description: "The product has been created.", |
| 9 | action: { |
| 10 | altText: "Undo product creation", |
| 11 | onClick: () => {}, |
| 12 | label: "Undo", |
| 13 | }, |
| 14 | duration: 10000, |
| 15 | }) |
| 16 | } |
| 17 | > |
| 18 | Show |
| 19 | </Button> |
| 20 | ) |
| 21 | } |