mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 23:46:03 +01:00
refactor(web/progress): hide progress bar if not visible
This commit is contained in:
@@ -66,18 +66,20 @@ const Progressbar: React.FC = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Box className={classes.container}>
|
{visible && (
|
||||||
<Box
|
<Box className={classes.container}>
|
||||||
className={classes.bar}
|
<Box
|
||||||
onAnimationEnd={progressComplete}
|
className={classes.bar}
|
||||||
sx={{
|
onAnimationEnd={progressComplete}
|
||||||
width: '0%',
|
sx={{
|
||||||
animation: 'progress-bar linear',
|
width: '0%',
|
||||||
animationDuration: `${duration}ms`,
|
animation: 'progress-bar linear',
|
||||||
}}
|
animationDuration: `${duration}ms`,
|
||||||
/>
|
}}
|
||||||
<Text className={classes.label}>{label}</Text>
|
/>
|
||||||
</Box>
|
<Text className={classes.label}>{label}</Text>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user