From 0828045400c43313f28dab1d6fc76784cd0bb163 Mon Sep 17 00:00:00 2001 From: WanQuanXie Date: Wed, 8 May 2024 12:06:53 +0800 Subject: [PATCH] feat(StyledSelect): reexport the { setSelectedChatModelProvider(e.target.value); @@ -178,29 +179,27 @@ const SettingsDialog = ({ config.chatModelProviders[e.target.value][0], ); }} - className="bg-[#111111] px-3 py-2 flex items-center overflow-hidden border border-[#1C1C1C] text-white rounded-lg text-sm" > {Object.keys(config.chatModelProviders).map( (provider) => ( - + ), )} - + )} {selectedChatModelProvider && selectedChatModelProvider != 'custom_openai' && (

Chat Model

- +
)} {selectedChatModelProvider && @@ -276,7 +275,7 @@ const SettingsDialog = ({

Embedding model Provider

- + )} {selectedEmbeddingModelProvider && (

Embedding Model

- +
)}
diff --git a/ui/components/common/StyledSelect.tsx b/ui/components/common/StyledSelect.tsx new file mode 100644 index 0000000..1a96755 --- /dev/null +++ b/ui/components/common/StyledSelect.tsx @@ -0,0 +1,28 @@ +import { cn } from '@/lib/utils'; +import type { OptionHTMLAttributes, SelectHTMLAttributes } from 'react'; + +export interface StyledSelectProps + extends SelectHTMLAttributes {} + +export const StyledSelect = function StyledSelect({ + className, + ...restProps +}: StyledSelectProps) { + return ( +