Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "~/components/ui/tooltip";
|
||||
import { HelpCircleIcon } from "~/components/ui/icons/vendor";
|
||||
|
||||
interface Props {
|
||||
text: string | React.ReactNode;
|
||||
children?: React.ReactNode;
|
||||
btnClassName?: string;
|
||||
}
|
||||
|
||||
export default function HintTooltip({ text, children, btnClassName }: Props) {
|
||||
return (
|
||||
<div className="group relative flex flex-col items-center">
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger type="button" tabIndex={-1} className={btnClassName}>
|
||||
{children ?? <HelpCircleIcon className="text-text-neutral-tertiary h-4 w-4" />}
|
||||
</TooltipTrigger>
|
||||
<TooltipContent className="border-border-default max-h-[300px] overflow-y-auto border shadow-md">
|
||||
<div className="text-sm">{text}</div>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { t as i18nT } from "i18next";
|
||||
import HintTooltip from "./HintTooltip";
|
||||
|
||||
export default function PreviewTooltips() {
|
||||
return (
|
||||
<div id="tabs" className="space-y-6">
|
||||
<div className="border-border bg-background border border-dashed p-6">
|
||||
{/* Preview-only sample row; no real form control to associate, so not a <label>. */}
|
||||
<div className="flex items-start space-x-1">
|
||||
<span>{i18nT("components.tooltips.preview.text")}</span> <HintTooltip text={i18nT("components.tooltips.preview.helpText")} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user