()
| 32 | } |
| 33 | |
| 34 | function ToastRegion() { |
| 35 | let state = useContext(ToastContext)!; |
| 36 | let ref = useRef(null); |
| 37 | let {regionProps} = useToastRegion({}, state, ref); |
| 38 | return ( |
| 39 | <div |
| 40 | {...regionProps} |
| 41 | ref={ref} |
| 42 | style={{ |
| 43 | position: 'fixed', |
| 44 | bottom: 0, |
| 45 | right: 0, |
| 46 | display: 'flex', |
| 47 | flexDirection: 'column', |
| 48 | gap: 10 |
| 49 | }}> |
| 50 | {state.visibleToasts.map(toast => ( |
| 51 | <Toast key={toast.key} toast={toast} /> |
| 52 | ))} |
| 53 | </div> |
| 54 | ); |
| 55 | } |
| 56 | |
| 57 | function Toast(props) { |
| 58 | let state = useContext(ToastContext)!; |
nothing calls this directly
no test coverage detected