Skip to content

Commit

Permalink
archiv faltante
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMendozaPrado committed May 5, 2024
1 parent 2ee1416 commit f1b45f0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions components/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from "react";

interface TooltipProps {
message: string;
children: React.ReactNode;
}

export default function Tooltip({ message, children }: TooltipProps) {
return (
<div className="group relative flex max-w-max flex-col items-center justify-center">
{children}
<div className="absolute bottom-7 left-1/2 z-10 ml-auto mr-auto min-w-max -translate-x-1/2 rotate-180 scale-0 transform rounded-xl px-3 py-2 text-xs font-medium transition-all duration-500 group-hover:scale-100">
<div className="flex max-w-xs flex-col items-center shadow-lg">
<div className="clip-bottom h-2 w-4 bg-primary/90"></div>
<div className="w-[25ch] rotate-180 cursor-default rounded bg-primary/90 p-2 text-center text-xs text-white">
{message}
</div>
</div>
</div>
</div>
);
}

0 comments on commit f1b45f0

Please sign in to comment.