fix(webui): share control layout for preset alignment

This commit is contained in:
chengyongru authored and chengyongru committed 2026-10-10 01:33:02 +08:00
1 parent 55ff1d8d1f
commit 763ae9c2ae
7 files changed
+49 -18

No files matched your search

+3 -2
View File
@@ -5,6 +5,7 @@ import { Check, ChevronDown, ChevronUp } from "lucide-react";
import { floatingSurfaceElevationClassName, floatingItemClassName } from "@/components/ui/floating-surface";
import { useFloatingPortal } from "@/components/ui/floating-portal";
import { cn } from "@/lib/utils";
import { ControlChevron } from "@/components/ui/control-chevron";
export const Select = SelectPrimitive.Root;
export const SelectValue = SelectPrimitive.Value;
@@ -14,9 +15,9 @@ export const SelectTrigger = React.forwardRef<
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
>(({ className, children, ...props }, ref) => (
<SelectPrimitive.Trigger ref={ref} {...props}
className={cn("flex h-9 items-center justify-between gap-2 rounded-control border border-input bg-background px-3 text-[13px] outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 [&>span:first-child]:truncate", className)}>
className={cn("control-layout justify-between rounded-control border-input bg-background text-[13px] outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 [&>span:first-child]:truncate", className)}>
{children}
<SelectPrimitive.Icon asChild><ChevronDown className="h-3.5 w-3.5 shrink-0 text-muted-foreground" aria-hidden /></SelectPrimitive.Icon>
<SelectPrimitive.Icon><ControlChevron /></SelectPrimitive.Icon>
</SelectPrimitive.Trigger>
));
SelectTrigger.displayName = "SelectTrigger";