mirror of
https://github.com/System-End/site.git
synced 2026-04-19 23:22:49 +00:00
let it spin!
This commit is contained in:
parent
54441c1a39
commit
c11733317d
1 changed files with 9 additions and 1 deletions
10
pages/bin.js
10
pages/bin.js
|
|
@ -144,6 +144,11 @@ function crunch() {
|
|||
audio.play()
|
||||
}
|
||||
|
||||
function spinIt(el) {
|
||||
el.classList.add("spin");
|
||||
setTimeout(() => el.classList.remove("spin"), 500);
|
||||
}
|
||||
|
||||
export default function Bin() {
|
||||
return (
|
||||
<>
|
||||
|
|
@ -167,12 +172,15 @@ export default function Bin() {
|
|||
|
||||
<Image
|
||||
src="https://cloud-mt5wqf6f5-hack-club-bot.vercel.app/0rummaging.png"
|
||||
onClick={() => { fireConfetti(); crunch() }}
|
||||
onClick={(e) => { fireConfetti(); crunch(); spinIt(e.target) }}
|
||||
sx={{
|
||||
cursor: 'pointer',
|
||||
':active': {
|
||||
animation: `${bounce} 0.125s`
|
||||
},
|
||||
'&.spin': {
|
||||
animation: `${spin} 0.25s`
|
||||
}
|
||||
}}
|
||||
/>
|
||||
{/* <Heading
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue