Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tooltip constant file to store text / tsx content for tooltip across the app. #126

Merged
merged 6 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion client/src/components/ui/info-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as React from "react";

import { InfoIcon } from "lucide-react";

import { cn } from "@/lib/utils";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need of importing cn if we are not mixing classes


import { Button } from "@/components/ui/button";
import {
Dialog,
Expand All @@ -16,8 +18,10 @@ import {
export default function InfoButton({
title,
children,
classNames,
}: PropsWithChildren<{
title?: string;
classNames?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better className so we are consistent with the rest of the codebase.

}>) {
return (
<Dialog>
Expand All @@ -26,7 +30,7 @@ export default function InfoButton({
<InfoIcon className="h-7 w-7 text-foreground hover:text-muted-foreground" />
</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-md">
<DialogContent className={cn(classNames)}>
<DialogHeader>
{title && <DialogTitle>{title}</DialogTitle>}
<DialogContentContainer>{children}</DialogContentContainer>
Expand Down
Loading
Loading