@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
41 lines (38 loc) • 1.12 kB
JavaScript
'use client';
import Icon_default from "../Icon/Icon.mjs";
import { variants } from "./style.mjs";
import { memo } from "react";
import { jsx } from "react/jsx-runtime";
import { Select } from "antd";
import { cx, useThemeMode } from "antd-style";
import { ChevronDownIcon } from "lucide-react";
//#region src/Select/Select.tsx
/**
* @deprecated Use `LobeSelect` instead.
*/
const Select$1 = memo(({ ref, variant, suffixIconProps, suffixIcon, shadow, className, ...rest }) => {
const { isDarkMode } = useThemeMode();
return /* @__PURE__ */ jsx(Select, {
className: cx(variants({
shadow,
variant: variant || (isDarkMode ? "filled" : "outlined")
}), className),
ref,
suffixIcon: /* @__PURE__ */ jsx(Icon_default, {
icon: suffixIcon || ChevronDownIcon,
size: "small",
...suffixIconProps,
style: {
pointerEvents: "none",
...suffixIconProps?.style
}
}),
variant: variant || (isDarkMode ? "filled" : "outlined"),
...rest
});
});
Select$1.displayName = "Select";
var Select_default = Select$1;
//#endregion
export { Select_default as default };
//# sourceMappingURL=Select.mjs.map