-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] serial number lookup + filter to only "All" group
Signed-off-by: Edouard Vanbelle <[email protected]>
- Loading branch information
1 parent
2aa7b0c
commit ff412b2
Showing
4 changed files
with
168 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import Button from "@components/Button"; | ||
import { Tooltip, TooltipContent, TooltipTrigger } from "@components/Tooltip"; | ||
import { motion } from "framer-motion"; | ||
import { RefreshCcw } from "lucide-react"; | ||
import * as React from "react"; | ||
import { useState } from "react"; | ||
|
||
type Props = { | ||
onClick: () => void; | ||
disabled?: boolean; | ||
variant?: "default" | "primary" | "secondary" | "input" | "dotted" | "tertiary" | "white" | "outline" | "danger-outline" | "default-outline" | "danger" | null | undefined; | ||
title?:any; | ||
children: any; | ||
}; | ||
export default function DataTableToolTipButton({ onClick, disabled, variant, title, children }: Props) { | ||
const [rotate, setRotate] = useState(false); | ||
//const [disabled, setDisabled] = useState(false); | ||
const [hovered, setHovered] = useState(false); | ||
|
||
return ( | ||
<Tooltip> | ||
<TooltipTrigger | ||
asChild={true} | ||
> | ||
<Button | ||
className={"h-[42px]"} | ||
variant={variant} | ||
disabled={disabled == true ? true : disabled} | ||
onClick={onClick} | ||
> | ||
{children} | ||
</Button> | ||
</TooltipTrigger> | ||
|
||
<TooltipContent | ||
sideOffset={10} | ||
className={"px-3 py-2"} | ||
onPointerDownOutside={(event) => { | ||
if (hovered) event.preventDefault(); | ||
}} | ||
> | ||
<span className={"text-xs text-neutral-300"}> | ||
{title} | ||
</span> | ||
</TooltipContent> | ||
</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
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