Skip to content

Commit

Permalink
(#0) Add Tootip className props
Browse files Browse the repository at this point in the history
  • Loading branch information
cause38 committed Feb 20, 2024
1 parent 7fb2b1e commit 13c05ce
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/core/components/Tooltip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@ import { PropsWithChildren, useId } from "react";
import { PlacesType, Tooltip as ReactToolTip } from "react-tooltip";

interface TooltipProps {
tooltipContentText: string;
placement?: PlacesType;
tooltipContentText: string;
placement?: PlacesType;
className?: string;
}
export default function Tooltip({
tooltipContentText,
placement = "top",
children,
}: PropsWithChildren<TooltipProps>) {
tooltipContentText,
placement = "top",
className = "!bg-primary-03 !rounded-lg",
children,
}: PropsWithChildren<TooltipProps>) {
const id = useId();
return(
return (
<>
<a
data-tooltip-id = {id}
data-tooltip-content = {tooltipContentText}
>
<a data-tooltip-id = {id} data-tooltip-content = {tooltipContentText}>
{children}
</a>
<ReactToolTip
id = {id}
place = {placement}
className = "!text-gray-07 !bg-primary-01 !rounded-lg"
className = {className}
style = {{ zIndex: 10 }}
/>
</>
);
Expand Down

0 comments on commit 13c05ce

Please sign in to comment.