mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-14 13:16:11 +01:00
20 lines
407 B
TypeScript
20 lines
407 B
TypeScript
import type { ReactNode } from "react";
|
|
import styles from "./index.module.css";
|
|
|
|
interface Props {
|
|
children: ReactNode;
|
|
tooltip: string;
|
|
side?: "top" | "left";
|
|
}
|
|
|
|
export function Tooltip({ children, tooltip, side = "top" }: Props) {
|
|
return (
|
|
<div className={styles.tooltip}>
|
|
<div className={styles.text} data-side={side}>
|
|
{tooltip}
|
|
</div>
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|