generated from kir-dev/next-nest-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
f3ae67a
commit 5bd5e15
Showing
4 changed files
with
72 additions
and
30 deletions.
There are no files selected for viewing
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
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,32 @@ | ||
'use client'; | ||
|
||
import { motion } from 'framer-motion'; | ||
import React from 'react'; | ||
|
||
import { Button, ButtonProps } from '@/components/ui/button'; | ||
import { cn } from '@/lib/utils'; | ||
|
||
interface ActionButtonProps extends ButtonProps { | ||
text: string; | ||
icon: React.ReactNode; | ||
} | ||
|
||
const ActionButton: React.FC<ActionButtonProps> = ({ text, variant, icon, className }) => { | ||
return ( | ||
<motion.div className='group transition-colors' whileHover='hover'> | ||
<Button variant={variant} className={cn('relative text-primary hover:text-primary', className)}> | ||
{text} | ||
<motion.div | ||
variants={{ | ||
hover: { x: 4 }, | ||
}} | ||
transition={{ duration: 0.2 }} | ||
> | ||
{icon} | ||
</motion.div> | ||
</Button> | ||
</motion.div> | ||
); | ||
}; | ||
|
||
export default ActionButton; |
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