-
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.
feat: add Tooltip component and integrate into moon-react; enhance Et…
…hereumNetwork provider logic and add transaction status watcher
- Loading branch information
Showing
8 changed files
with
561 additions
and
232 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
18 changes: 18 additions & 0 deletions
18
packages/moon-react/src/components/Core/ToolTip/ToolTip.tsx
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,18 @@ | ||
// components/Tooltip.tsx | ||
import * as TooltipPrimitive from "@radix-ui/react-tooltip"; | ||
import React from "react"; | ||
|
||
interface TooltipProps { | ||
content: React.ReactNode; | ||
children: React.ReactNode; | ||
} | ||
|
||
export const Tooltip: React.FC<TooltipProps> = ({ content, children }) => ( | ||
<TooltipPrimitive.Root> | ||
<TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger> | ||
<TooltipPrimitive.Content className="data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade px-2 py-1 rounded-md bg-black text-white shadow-md"> | ||
<TooltipPrimitive.Arrow className="fill-current text-black" /> | ||
{content} | ||
</TooltipPrimitive.Content> | ||
</TooltipPrimitive.Root> | ||
); |
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 @@ | ||
export * from "./ToolTip"; |
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,5 +1,7 @@ | ||
export * from './Button'; | ||
export * from './Input'; | ||
export * from './Modal'; | ||
export * from "./Button"; | ||
export * from "./Input"; | ||
export * from "./Modal"; | ||
|
||
export * from './Dropdown'; | ||
export * from "./Dropdown"; | ||
|
||
export * from "./ToolTip"; |
Oops, something went wrong.