Add small prop to PeopleSearch components for reduced height

- Add small prop support to PeopleSearch component
- Pass small prop to PeopleSearch in AttendeeSearch
- Use small prop in EventFormFields Participants field
- Use small prop in TempCalendarsInput for left sidebar
This commit is contained in:
lenhanphung
2025-12-12 16:06:45 +07:00
committed by Benoit TELLIER
parent 1347583e9a
commit 12776d36a4
5 changed files with 13 additions and 1 deletions
@@ -6,10 +6,12 @@ export default function UserSearch({
attendees,
setAttendees,
disabled,
small,
}: {
attendees: userAttendee[];
setAttendees: Function;
disabled?: boolean;
small?: boolean;
}) {
const [selectedUsers, setSelectedUsers] = useState(
attendees.map((a) => ({
@@ -35,6 +37,7 @@ export default function UserSearch({
selectedUsers={selectedUsers}
objectTypes={["user", "contact"]}
disabled={disabled}
small={small}
onChange={(event: any, value: User[]) => {
setAttendees(
value.map((a: User) => ({
@@ -30,6 +30,7 @@ export function PeopleSearch({
freeSolo,
onToggleEventPreview,
placeholder,
small,
}: {
selectedUsers: User[];
onChange: Function;
@@ -38,6 +39,7 @@ export function PeopleSearch({
freeSolo?: boolean;
onToggleEventPreview?: () => void;
placeholder?: string;
small?: boolean;
}) {
const { t } = useI18n();
const [query, setQuery] = useState("");
@@ -151,6 +153,7 @@ export function PeopleSearch({
</label>
<TextField
{...params}
size={small ? "small" : "medium"}
error={!!inputError}
helperText={inputError}
placeholder={searchPlaceholder}