Skip to content

Commit

Permalink
make model param full width
Browse files Browse the repository at this point in the history
  • Loading branch information
aakrem committed Apr 2, 2024
1 parent 98f87b8 commit 234600f
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions agenta-web/src/components/Playground/Views/ParametersCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,23 @@ interface GroupedSelectProps {
handleChange: (value: string) => void
}

const GroupedSelect: React.FC<GroupedSelectProps> = ({choices, defaultValue, handleChange}) => (
<Select
defaultValue={defaultValue}
style={{width: 200}}
onChange={handleChange}
options={Object.entries(choices).map(([groupLabel, groupChoices]) => ({
label: groupLabel,
options: groupChoices.map((choice) => ({
label: choice,
value: choice,
})),
}))}
/>
)
const GroupedSelect: React.FC<GroupedSelectProps> = ({choices, defaultValue, handleChange}) => {
const classes = useStyles()
return (
<Select
defaultValue={defaultValue}
className={classes.select}
onChange={handleChange}
options={Object.entries(choices).map(([groupLabel, groupChoices]) => ({
label: groupLabel,
options: groupChoices.map((choice) => ({
label: choice,
value: choice,
})),
}))}
/>
)
}

interface ModelParametersProps {
optParams: Parameter[] | null
Expand Down

0 comments on commit 234600f

Please sign in to comment.