feat: Work on homepage
This commit is contained in:
parent
78e8987951
commit
4f3820b3be
18 changed files with 746 additions and 181 deletions
16
sites/shared/components/animations/loading-bar.mjs
Normal file
16
sites/shared/components/animations/loading-bar.mjs
Normal file
|
@ -0,0 +1,16 @@
|
|||
export const LoadingBar = ({ duration = 1000, color = 'primary' }) => {
|
||||
const [started, setStarted] = useState(false)
|
||||
useEffect(() => {
|
||||
setTimeout(() => setStarted(true), 100)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className={`w-full bg-base-200 rounded-full h-2.5 mb-4 bg-${color} bg-opacity-30`}>
|
||||
<div
|
||||
className={`bg-${color} h-2.5 rounded-full transition-all ${
|
||||
started ? 'w-full' : 'w-0'
|
||||
} duration-[${duration}ms]`}
|
||||
></div>
|
||||
</div>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue