Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

button group overlap borders instead of collapse

Scott Wilson04cdddd462f2
diff --git a/frontend/src/components/v3/generic/ButtonGroup/ButtonGroup.tsx b/frontend/src/components/v3/generic/ButtonGroup/ButtonGroup.tsx
index b712c1f555..0d78355cfe 100644
--- a/frontend/src/components/v3/generic/ButtonGroup/ButtonGroup.tsx
+++ b/frontend/src/components/v3/generic/ButtonGroup/ButtonGroup.tsx
@@ -5,14 +5,14 @@ import { cn } from "../../utils";
import { Separator } from "../Separator";
const buttonGroupVariants = cva(
- "flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
+ "flex w-fit items-stretch [&>*]:relative [&>*:hover]:z-10 [&>*:focus-visible]:z-10 [&>*[data-state=open]]:z-10 [&>*[aria-pressed=true]]:z-10 [&>*[aria-selected=true]]:z-10 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
{
variants: {
orientation: {
horizontal:
- "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
+ "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:-ml-px [&>*:not(:last-child)]:rounded-r-none",
vertical:
- "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
+ "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:last-child)]:rounded-b-none"
}
},
defaultVariants: {