-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7201421
commit 4ee6ae9
Showing
17 changed files
with
154 additions
and
343 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
98 changes: 0 additions & 98 deletions
98
apps/hyperdrive-trading/src/ui/base/components/MultiStat.tsx
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
apps/hyperdrive-trading/src/ui/base/components/Tooltip/TextWithTooltip.tsx
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
apps/hyperdrive-trading/src/ui/base/components/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,37 @@ | ||
import classNames from "classnames"; | ||
import { PropsWithChildren, ReactElement } from "react"; | ||
|
||
interface CellWithTooltipProps extends PropsWithChildren { | ||
className?: string; | ||
tooltip?: string; | ||
position?: "top" | "bottom" | "left" | "right"; | ||
} | ||
|
||
export function Tooltip({ | ||
children, | ||
className, | ||
tooltip, | ||
position = "top", | ||
}: CellWithTooltipProps): ReactElement { | ||
if (!tooltip) { | ||
return <div className={className}>{children}</div>; | ||
} | ||
return ( | ||
<div | ||
data-tip={tooltip} | ||
// Future note: use before: to style the text inside the tooltip | ||
className={classNames( | ||
"daisy-tooltip flex cursor-help items-center transition duration-150 ease-in-out before:whitespace-normal before:border before:border-gray-900 before:bg-gray-700 before:px-3 before:py-2 before:shadow-2xl", | ||
{ | ||
"daisy-tooltip-top": position === "top", | ||
"daisy-tooltip-bottom": position === "bottom", | ||
"daisy-tooltip-left": position === "left", | ||
"daisy-tooltip-right": position === "right", | ||
}, | ||
className, | ||
)} | ||
> | ||
{children} | ||
</div> | ||
); | ||
} |
24 changes: 0 additions & 24 deletions
24
apps/hyperdrive-trading/src/ui/base/components/WarningButton.tsx
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.