(content: string | JSX.Element)
| 3 | import React from 'dom-chef'; |
| 4 | |
| 5 | export default async function showOverlay(content: string | JSX.Element): Promise<void> { |
| 6 | const overlay = <div className="rgh-overlay">{content}</div>; |
| 7 | document.body.append(overlay); |
| 8 | await overlay.animate( |
| 9 | [{opacity: 1}, {opacity: 0}], |
| 10 | { |
| 11 | duration: 300, |
| 12 | delay: 2000, |
| 13 | easing: 'ease-in', |
| 14 | fill: 'forwards', |
| 15 | }, |
| 16 | ).finished; |
| 17 | overlay.remove(); |
| 18 | } |
no test coverage detected