Change design of modal loading and error screens in web UI (#33092)

This commit is contained in:
Eugen Rochko authored and GitHub committed 2024-11-29 07:50:08 +00:00
1 parent eef8d2c855
commit 7f2cfcccab
8 files changed
+118 -234

No files matched your search

@@ -0,0 +1,22 @@
import { useHovering } from '@/hooks/useHovering';
import { autoPlayGif } from 'mastodon/initial_state';
export const GIF: React.FC<{
src: string;
staticSrc: string;
className: string;
animate?: boolean;
}> = ({ src, staticSrc, className, animate = autoPlayGif }) => {
const { hovering, handleMouseEnter, handleMouseLeave } = useHovering(animate);
return (
<img
className={className}
src={hovering || animate ? src : staticSrc}
alt=''
role='presentation'
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
/>
);
};