refactor(platform): 统一控件 - 收敛下拉选择与按钮输入交互样式
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { Button, Checkbox as AntCheckbox, Segmented, Select as AntSelect, Switch as AntSwitch, Tooltip as AntTooltip } from "antd";
|
||||
import { Button, Checkbox as AntCheckbox, Segmented, Switch as AntSwitch, Tooltip as AntTooltip } from "antd";
|
||||
import type { CheckboxChangeEvent } from "antd/es/checkbox";
|
||||
import type { ButtonProps } from "antd";
|
||||
import type { LucideIcon } from "lucide-react";
|
||||
import type { CSSProperties, InputHTMLAttributes, ReactNode } from "react";
|
||||
|
||||
import { Select as UnifiedSelect } from "@/components/ui/base/select";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
export function AdminSwitch({
|
||||
@@ -46,7 +48,7 @@ export function AdminSelect<V extends string = string>({
|
||||
ariaLabel?: string;
|
||||
className?: string;
|
||||
}) {
|
||||
return <AntSelect {...props} size={size === "sm" ? "small" : "middle"} className={cn("admin-select", className)} aria-label={ariaLabel} onChange={(value) => onChange?.(value as V)} />;
|
||||
return <UnifiedSelect {...props} size={size === "sm" ? "small" : "middle"} className={cn("admin-select", className)} aria-label={ariaLabel} onChange={(value) => onChange?.(value as V)} />;
|
||||
}
|
||||
|
||||
export function Select<V extends string = string>(props: Parameters<typeof AdminSelect<V>>[0]) {
|
||||
|
||||
Reference in New Issue
Block a user