-
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.
unifies info tooltips in single component
- Loading branch information
Showing
5 changed files
with
82 additions
and
92 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
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 { PropsWithChildren } from "react"; | ||
import * as React from "react"; | ||
|
||
import { InfoIcon } from "lucide-react"; | ||
|
||
import { Button } from "@/components/ui/button"; | ||
import { | ||
Dialog, | ||
DialogContent, | ||
DialogContentContainer, | ||
DialogHeader, | ||
DialogTitle, | ||
DialogTrigger, | ||
} from "@/components/ui/dialog"; | ||
|
||
export default function InfoButton({ | ||
title, | ||
children, | ||
}: PropsWithChildren<{ | ||
title?: string; | ||
}>) { | ||
return ( | ||
<Dialog> | ||
<DialogTrigger asChild> | ||
<Button variant="ghost" className="h-5 w-5 p-0 hover:bg-transparent"> | ||
<InfoIcon className="h-7 w-7 text-foreground hover:text-muted-foreground" /> | ||
</Button> | ||
</DialogTrigger> | ||
<DialogContent className="sm:max-w-md"> | ||
<DialogHeader> | ||
{title && <DialogTitle>{title}</DialogTitle>} | ||
<DialogContentContainer>{children}</DialogContentContainer> | ||
</DialogHeader> | ||
</DialogContent> | ||
</Dialog> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,41 @@ | ||
import InfoDownloadProjectsTable from "@/containers/projects/table/toolbar/info-download"; | ||
import SearchProjectsTable from "@/containers/projects/table/toolbar/search"; | ||
import TabsProjectsTable from "@/containers/projects/table/toolbar/table-selector"; | ||
|
||
import InfoButton from "@/components/ui/info-button"; | ||
|
||
export default function ToolbarProjectsTable() { | ||
return ( | ||
<div className="flex items-center justify-between px-5 py-3"> | ||
<SearchProjectsTable /> | ||
<TabsProjectsTable /> | ||
<InfoDownloadProjectsTable /> | ||
<div className="flex flex-1 items-center justify-end space-x-2"> | ||
<InfoButton> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
vehicula, nunc nec vehicula fermentum, nunc libero bibendum purus, | ||
nec tincidunt libero nunc nec libero. Integer nec libero nec libero | ||
tincidunt tincidunt. Sed vehicula, nunc nec vehicula fermentum, nunc | ||
libero bibendum purus, nec tincidunt libero nunc nec libero. Integer | ||
nec libero nec libero tincidunt tincidunt. | ||
</p> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
vehicula, nunc nec vehicula fermentum, nunc libero bibendum purus, | ||
nec tincidunt libero nunc nec libero. Integer nec libero nec libero | ||
tincidunt tincidunt. Sed vehicula, nunc nec vehicula fermentum, nunc | ||
libero bibendum purus, nec tincidunt libero nunc nec libero. Integer | ||
nec libero nec libero tincidunt tincidunt. | ||
</p> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
vehicula, nunc nec vehicula fermentum, nunc libero bibendum purus, | ||
nec tincidunt libero nunc nec libero. Integer nec libero nec libero | ||
tincidunt tincidunt. Sed vehicula, nunc nec vehicula fermentum, nunc | ||
libero bibendum purus, nec tincidunt libero nunc nec libero. Integer | ||
nec libero nec libero tincidunt tincidunt. | ||
</p> | ||
</InfoButton> | ||
</div> | ||
</div> | ||
); | ||
} |
60 changes: 0 additions & 60 deletions
60
client/src/containers/projects/table/toolbar/info-download/index.tsx
This file was deleted.
Oops, something went wrong.