(message: string, options?: ExternalToast)
| 33 | |
| 34 | // Error toast with destructive colors (matching text-destructive) |
| 35 | export const error = (message: string, options?: ExternalToast) => { |
| 36 | return sonnerToast.error(message, { |
| 37 | ...defaultOptions, |
| 38 | duration: 6000, // Longer for errors |
| 39 | style: { |
| 40 | background: 'hsl(var(--background))', |
| 41 | border: '1px solid hsl(var(--destructive) / 0.5)', |
| 42 | color: 'hsl(var(--destructive))', |
| 43 | ...options?.style, |
| 44 | }, |
| 45 | ...options, |
| 46 | }); |
| 47 | }; |
| 48 | |
| 49 | // Warning toast with yellow colors (matching text-yellow-400) |
| 50 | export const warning = (message: string, options?: ExternalToast) => { |
no outgoing calls
no test coverage detected