-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed icons timer / added tooltips to buttons
- Loading branch information
1 parent
5b10166
commit 76dcfa2
Showing
5 changed files
with
53 additions
and
34 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
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 |
---|---|---|
@@ -1,21 +1,41 @@ | ||
interface InteractiveIcon extends React.HTMLAttributes<HTMLDivElement> { | ||
import { | ||
Tooltip, | ||
TooltipContent, | ||
TooltipProvider, | ||
TooltipTrigger, | ||
} from "@/components/ui/tooltip"; | ||
|
||
interface InteractiveIconProps extends React.HTMLAttributes<HTMLDivElement> { | ||
icon: React.ReactNode; | ||
animation?: boolean; | ||
message?: string; | ||
} | ||
|
||
export function InteractiveIcon({ | ||
icon, | ||
animation = false, | ||
message, | ||
...props | ||
}: InteractiveIcon) { | ||
}: InteractiveIconProps) { | ||
return ( | ||
<div | ||
{...props} | ||
className={`light:text-neutral-800 light:hover:text-neutral-600 dark:text-neutral-100 dark:hover:text-neutral-200 hover:cursor-pointer duration-300 transition ${ | ||
animation ? "hover:rotate-45" : "" | ||
}`} | ||
> | ||
{icon} | ||
</div> | ||
<TooltipProvider delayDuration={250}> | ||
<Tooltip> | ||
<TooltipTrigger asChild> | ||
<div | ||
{...props} | ||
className={`light:text-neutral-800 light:hover:text-neutral-600 dark:text-neutral-100 dark:hover:text-neutral-200 hover:cursor-pointer duration-300 transition ${ | ||
animation ? "hover:rotate-45" : "" | ||
}`} | ||
> | ||
{icon} | ||
</div> | ||
</TooltipTrigger> | ||
{message && ( | ||
<TooltipContent> | ||
<p>{message}</p> | ||
</TooltipContent> | ||
)} | ||
</Tooltip> | ||
</TooltipProvider> | ||
); | ||
} |
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