Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: improve action parameters UI (#6549)
https://linear.app/unleash/issue/2-2041/improve-action-parameters-ui Improves the UI of action parameters, implementing a new `ProjectActionsActionParameterAutocomplete` component that allows search. ![image](https://github.com/Unleash/unleash/assets/14320932/b87de507-2feb-433b-846f-0f3cc61721fa)
- Loading branch information
Showing
3 changed files
with
47 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...rmStepActions/ProjectActionsActionParameter/ProjectActionsActionParameterAutocomplete.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Autocomplete, TextField } from '@mui/material'; | ||
|
||
interface IProjectActionsActionParameterAutocompleteProps { | ||
label: string; | ||
value: string; | ||
onChange: (value: string) => void; | ||
options: string[]; | ||
} | ||
|
||
export const ProjectActionsActionParameterAutocomplete = ({ | ||
label, | ||
value, | ||
onChange, | ||
options, | ||
}: IProjectActionsActionParameterAutocompleteProps) => ( | ||
<Autocomplete | ||
options={options} | ||
autoHighlight | ||
autoSelect | ||
value={value} | ||
onInputChange={(_, parameter) => onChange(parameter)} | ||
renderInput={(params) => ( | ||
<TextField {...params} size='small' label={label} /> | ||
)} | ||
/> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters