()
| 35 | }); |
| 36 | |
| 37 | export function MyToastRegion() { |
| 38 | return ( |
| 39 | // The ToastRegion should be rendered at the root of your app. |
| 40 | <ToastRegion queue={queue}> |
| 41 | {({toast}) => ( |
| 42 | <MyToast toast={toast} style={{viewTransitionName: toast.key} as CSSProperties}> |
| 43 | <ToastContent> |
| 44 | <Text slot="title">{toast.content.title}</Text> |
| 45 | {toast.content.description && ( |
| 46 | <Text slot="description">{toast.content.description}</Text> |
| 47 | )} |
| 48 | </ToastContent> |
| 49 | <Button slot="close" aria-label="Close" variant="quiet"> |
| 50 | <X size={16} /> |
| 51 | </Button> |
| 52 | </MyToast> |
| 53 | )} |
| 54 | </ToastRegion> |
| 55 | ); |
| 56 | } |
| 57 | |
| 58 | export function MyToast(props: ToastProps<MyToastContent>) { |
| 59 | return <Toast {...props} />; |
nothing calls this directly
no outgoing calls
no test coverage detected