mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
23 lines
605 B
TypeScript
23 lines
605 B
TypeScript
const flashScreen = async () => {
|
|
const flash = document.createElement('div');
|
|
flash.style.position = 'fixed';
|
|
flash.style.top = '0';
|
|
flash.style.left = '0';
|
|
flash.style.width = '100%';
|
|
flash.style.height = '100%';
|
|
flash.style.backgroundColor = 'rgba(0, 255, 0, 0.3)';
|
|
flash.style.zIndex = '9999';
|
|
flash.style.pointerEvents = 'none';
|
|
document.body.appendChild(flash);
|
|
|
|
setTimeout(() => {
|
|
flash.style.transition = 'opacity 0.5s';
|
|
flash.style.opacity = '0';
|
|
setTimeout(() => {
|
|
document.body.removeChild(flash);
|
|
}, 500);
|
|
}, 200);
|
|
};
|
|
|
|
export default flashScreen;
|