feat: add loader bar to animate loading state
This commit is contained in:
parent
acaf0ca0af
commit
17654b885b
3 changed files with 24 additions and 0 deletions
13
website/src/repl/Loader.jsx
Normal file
13
website/src/repl/Loader.jsx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { cx } from '@strudel.cycles/react';
|
||||
import React from 'react';
|
||||
|
||||
function Loader({ active }) {
|
||||
return (
|
||||
<div className="overflow-hidden opacity-50 fixed top-0 left-0 w-full z-[1000]">
|
||||
<div className={cx('h-[2px] block w-full', active ? 'bg-foreground animate-train' : 'bg-transparent')}>
|
||||
<div />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
export default Loader;
|
||||
Loading…
Add table
Add a link
Reference in a new issue