Skip to content

Commit c2698cc

Browse files
committed
🧹 moved Emoji Confetti to effects
1 parent de4dfe5 commit c2698cc

File tree

6 files changed

+27
-22
lines changed

6 files changed

+27
-22
lines changed

src/app/(docs)/components/button/emoji-confetti-button/page.mdx

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export const metadata = {
2+
title: 'Emoji Confetti ',
3+
description:
4+
'A confetti effects button that displays a random emoji confetti effect on click, implemented using Tailwind CSS & Framer Motion for React and libraries like Next.js.',
5+
}
6+
7+
<BackButton href="/components/button" />
8+
<ComponentPreview path="effects/EmojiConfetti" usingFramer/>

src/components/Navigation.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,17 @@ export const navigation: Array<NavGroup> = [
321321
{
322322
title: 'Background',
323323
href: '/effects/background',
324-
tag: 'new',
325324
},
326325
{
327326
title: 'Gradients',
328327
href: '/effects/gradients',
329328
},
330329
{ title: 'Image Fade', href: '/effects/image-fade' },
330+
{
331+
title: 'Emoji Confetti',
332+
href: '/effects/emoji-confetti',
333+
tag: 'new',
334+
},
331335
],
332336
},
333337
]

src/showcase/components/button/EmojiConfettiButton.tsx renamed to src/showcase/effects/EmojiConfetti.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface Particle {
1313
rotationSpeed: number
1414
}
1515

16-
const EmojiConfettiButton: React.FC = () => {
16+
const EmojiConfetti: React.FC = () => {
1717
const [isExploding, setIsExploding] = useState(false)
1818
const buttonRef = useRef<HTMLButtonElement>(null)
1919
const canvasRef = useRef<HTMLCanvasElement>(null)
@@ -111,7 +111,7 @@ const EmojiConfettiButton: React.FC = () => {
111111
whileTap={{ scale: 0.95 }}
112112
onClick={handleClick}
113113
>
114-
Celebrate!
114+
Click Me! 🎉
115115
</motion.button>
116116
{isExploding && (
117117
<canvas
@@ -124,4 +124,4 @@ const EmojiConfettiButton: React.FC = () => {
124124
)
125125
}
126126

127-
export default EmojiConfettiButton
127+
export default EmojiConfetti

src/showcase/ui-group/ButtonCards.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Link from 'next/link'
21
import ThreeDButton from '@/showcase/components/button/3DButton'
32
import BorderGlowButton from '@/showcase/components/button/BorderGlowButton'
43
import GradientFillButton from '@/showcase/components/button/GradientFillButton'
@@ -7,13 +6,12 @@ import NeubrutalismButton from '@/showcase/components/button/NeubrutalismButton'
76
import ShimmerButton from '@/showcase/components/button/ShimmerButton'
87
import ShineButton from '@/showcase/components/button/ShineButton'
98
import StitchesButton from '@/showcase/components/button/StitchesButton'
10-
import TextRevealButton from '../components/button/TextRevealButton'
11-
import Card from './Card'
9+
import Link from 'next/link'
1210
import BounceButton from '../components/button/BounceButton'
1311
import MagneticButton from '../components/button/MagneticButton'
14-
import { title } from 'process'
1512
import StarWarsButton from '../components/button/StarWarsButton'
16-
import EmojiConfettiButton from '../components/button/EmojiConfettiButton'
13+
import TextRevealButton from '../components/button/TextRevealButton'
14+
import Card from './Card'
1715

1816
const data = [
1917
{
@@ -46,11 +44,7 @@ const data = [
4644
link: '/components/button/star-wars-button',
4745
component: <StarWarsButton />,
4846
},
49-
{
50-
title: 'Emoji Confetti',
51-
link: '/components/button/emoji-confetti-button',
52-
component: <EmojiConfettiButton />,
53-
},
47+
5448
{
5549
title: 'Shine',
5650
link: '/components/button/shine-button',

src/showcase/ui-group/EffectCards.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import Image from 'next/image'
22
import Link from 'next/link'
33
import DotPatternBackground from '../effects/BackgroundDots'
44
import Card from './Card'
5+
import EmojiConfetti from '../effects/EmojiConfetti'
56

67
const data = [
78
{
@@ -24,6 +25,12 @@ const data = [
2425
),
2526
link: '/effects/background',
2627
},
28+
{
29+
id: 4,
30+
title: 'Emoji Confetti',
31+
link: '/effects/emoji-confetti',
32+
preview: <EmojiConfetti />,
33+
},
2734
]
2835

2936
const EffectCards = () => {

0 commit comments

Comments
 (0)