-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c6fd06
commit 303d9cd
Showing
10 changed files
with
111 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file added
BIN
+11.6 KB
.yarn/cache/@types-canvas-confetti-npm-1.9.0-128dcb43d0-ffe2c674d4.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+94.5 KB
.yarn/cache/react-canvas-confetti-npm-2.0.7-566ef1fc5e-709a0f3c41.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import confetti from "canvas-confetti"; | ||
|
||
import type { Options as ConfettiOptions } from "canvas-confetti"; | ||
|
||
export const handleConfetti = () => { | ||
const setting: ConfettiOptions = { | ||
particleCount: 100, | ||
spread: 100, | ||
origin: { y: 0.2 }, | ||
colors: ["#f4abfe", "#cd90f2", "#eff0ff", "#6f91ff"], | ||
ticks: 50, | ||
}; | ||
|
||
confetti({ | ||
...setting, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
declare module "canvas-confetti" { | ||
export interface Options { | ||
particleCount?: number; | ||
angle?: number; | ||
spread?: number; | ||
startVelocity?: number; | ||
decay?: number; | ||
gravity?: number; | ||
drift?: number; | ||
ticks?: number; | ||
origin?: { | ||
x?: number; | ||
y?: number; | ||
}; | ||
colors?: string[]; | ||
shapes?: Array<"square" | "circle">; | ||
scalar?: number; | ||
zIndex?: number; | ||
} | ||
|
||
export default function confetti(options?: Options): Promise<null>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters