mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 23:16:03 +01:00
fix(web/progress): nui callback on progress unmount
fixes an issue where activating 2 progress bars/circles one after another would cause a stuck progress bar. resolves #227
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
|
||||
const ScaleFade: React.FC<{ visible: boolean; children: React.ReactNode }> = ({ visible, children }) => {
|
||||
const ScaleFade: React.FC<{ visible: boolean; children: React.ReactNode; onExitComplete?: () => void }> = ({
|
||||
visible,
|
||||
children,
|
||||
onExitComplete,
|
||||
}) => {
|
||||
return (
|
||||
<>
|
||||
<AnimatePresence>
|
||||
<AnimatePresence onExitComplete={onExitComplete}>
|
||||
{visible && (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, scale: 0.95 }}
|
||||
|
||||
Reference in New Issue
Block a user