Skip to content

Commit f2127e9

Browse files
committed
fix some style issues around model selection
1 parent 9d25e8b commit f2127e9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/views/ModelSelectionDialog.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ export const ModelSelectionButton: React.FC<{}> = ({ }) => {
267267
value={newModel}
268268
options={newEndpoint && providerModelOptions[newEndpoint] ? providerModelOptions[newEndpoint] : []}
269269
loading={isLoadingModelOptions}
270+
loadingText={<Typography sx={{fontSize: "0.875rem"}}>loading...</Typography>}
270271
renderOption={(props, option) => {
271272
return <Typography {...props} onClick={()=>{ setNewModel(option); }} sx={{fontSize: "small"}}>{option}</Typography>
272273
}}
@@ -280,7 +281,7 @@ export const ModelSelectionButton: React.FC<{}> = ({ }) => {
280281
style: { fontSize: "0.875rem" },
281282
endAdornment: (
282283
<>
283-
{isLoadingModelOptions ? <CircularProgress color="inherit" size={20} /> : null}
284+
{isLoadingModelOptions ? <CircularProgress color="primary" size={20} /> : null}
284285
{params.InputProps.endAdornment}
285286
</>
286287
),
@@ -298,9 +299,11 @@ export const ModelSelectionButton: React.FC<{}> = ({ }) => {
298299
}}
299300
PaperComponent={({ children }) => (
300301
<Paper>
301-
<Typography sx={{ p: 1, color: 'gray', fontStyle: 'italic', fontSize: 'small' }}>
302-
{isLoadingModelOptions ? 'Loading models...' : 'examples'}
303-
</Typography>
302+
{!isLoadingModelOptions && (
303+
<Typography sx={{ p: 1, color: 'gray', fontStyle: 'italic', fontSize: 'small' }}>
304+
examples
305+
</Typography>
306+
)}
304307
{children}
305308
</Paper>
306309
)}

0 commit comments

Comments
 (0)