mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 05:38:04 +00:00
feat: updates
This commit is contained in:
parent
a1b0bcf4d3
commit
884f3df41a
198 changed files with 4572 additions and 5336 deletions
31
packages/web/components/Wave.tsx
Normal file
31
packages/web/components/Wave.tsx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { css, cx, keyframes } from '@emotion/css'
|
||||
|
||||
const wave = keyframes`
|
||||
0% { transform: scaleY(1) }
|
||||
50% { transform: scaleY(0.2) }
|
||||
100% { transform: scaleY(1)}
|
||||
`
|
||||
const animation = css`
|
||||
transform-origin: bottom;
|
||||
animation: ${wave} 1s ease-in-out infinite;
|
||||
`
|
||||
const delay = ['-100ms', '-500ms', '-1200ms', '-1000ms', '-700ms']
|
||||
|
||||
const Wave = ({ playing }: { playing: boolean }) => {
|
||||
return (
|
||||
<div className='grid h-3 grid-cols-5 items-end gap-0.5'>
|
||||
{[...new Array(5).keys()].map(i => (
|
||||
<div
|
||||
key={i}
|
||||
className={cx('h-full w-0.5 bg-brand-600', animation)}
|
||||
style={{
|
||||
animationDelay: delay[i],
|
||||
animationPlayState: playing ? 'running' : 'paused',
|
||||
}}
|
||||
></div>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Wave
|
||||
Loading…
Add table
Add a link
Reference in a new issue