Enhance UI: #355 Remove labels, update buttons, icons, and styles (#356)

Co-authored-by: Lê Nhân Phụng <lenhanphung@Phung-Mac-M4.local>
This commit is contained in:
lenhanphung
2025-11-25 17:17:24 +07:00
committed by GitHub
parent ffe14b6b6c
commit 25dc016688
8 changed files with 91 additions and 59 deletions
+43 -39
View File
@@ -141,46 +141,50 @@ export function PeopleSearch({
onChange(event, mapped);
}}
renderInput={(params) => (
<TextField
{...params}
error={!!inputError}
helperText={inputError}
placeholder={t("peopleSearch.placeholder")}
label={t("peopleSearch.label")}
autoComplete="off"
onKeyDown={(e) => {
if (e.key === "Enter" && onToggleEventPreview) {
e.preventDefault();
onToggleEventPreview();
}
}}
slotProps={{
input: {
...params.InputProps,
<>
<label htmlFor={params.id} className="visually-hidden">
{t("peopleSearch.label")}
</label>
<TextField
{...params}
error={!!inputError}
helperText={inputError}
placeholder={t("peopleSearch.placeholder")}
label=""
inputProps={{
...params.inputProps,
autoComplete: "off",
startAdornment: (
<>
<PeopleOutlineOutlinedIcon
style={{ marginRight: 8, color: "rgba(0, 0, 0, 0.54)" }}
/>
{params.InputProps.startAdornment}
</>
),
endAdornment: (
<>
{loading ? (
<CircularProgress color="inherit" size={20} />
) : null}
{params.InputProps.endAdornment}
</>
),
},
}}
inputProps={{
...params.inputProps,
autoComplete: "off",
}}
/>
}}
onKeyDown={(e) => {
if (e.key === "Enter" && onToggleEventPreview) {
e.preventDefault();
onToggleEventPreview();
}
}}
slotProps={{
input: {
...params.InputProps,
autoComplete: "off",
startAdornment: (
<>
<PeopleOutlineOutlinedIcon
style={{ marginRight: 8, color: "rgba(0, 0, 0, 0.54)" }}
/>
{params.InputProps.startAdornment}
</>
),
endAdornment: (
<>
{loading ? (
<CircularProgress color="inherit" size={20} />
) : null}
{params.InputProps.endAdornment}
</>
),
},
}}
/>
</>
)}
renderOption={(props, option) => {
if (selectedUsers.find((u) => u.email === option.email)) return null;