1
+ import styled from '@emotion/styled' ;
1
2
import { useEffect , useState } from 'react' ;
2
3
import { useRecoilValue } from 'recoil' ;
3
4
import { Key } from 'ts-key-enum' ;
4
- import { Avatar } from 'twenty-ui' ;
5
+ import { AvatarChip } from 'twenty-ui' ;
5
6
6
7
import { SelectableItem } from '@/object-record/select/types/SelectableItem' ;
7
8
import { DropdownMenuSkeletonItem } from '@/ui/input/relation-picker/components/skeletons/DropdownMenuSkeletonItem' ;
@@ -14,6 +15,16 @@ import { MenuItem } from '@/ui/navigation/menu-item/components/MenuItem';
14
15
import { MenuItemMultiSelectAvatar } from '@/ui/navigation/menu-item/components/MenuItemMultiSelectAvatar' ;
15
16
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys' ;
16
17
18
+ const StyledAvatarChip = styled ( AvatarChip ) `
19
+ &.avatar-icon-container {
20
+ color: ${ ( { theme } ) => theme . font . color . secondary } ;
21
+ gap: ${ ( { theme } ) => theme . spacing ( 2 ) } ;
22
+ padding-left: 0px;
23
+ padding-right: 0px;
24
+ font-size: ${ ( { theme } ) => theme . font . size . md } ;
25
+ }
26
+ ` ;
27
+
17
28
export const MultipleSelectDropdown = ( {
18
29
selectableListId,
19
30
hotkeyScope,
@@ -120,15 +131,16 @@ export const MultipleSelectDropdown = ({
120
131
handleItemSelectChange ( item , newCheckedValue ) ;
121
132
} }
122
133
avatar = {
123
- < Avatar
134
+ < StyledAvatarChip
135
+ className = "avatar-icon-container"
136
+ name = { item . name }
124
137
avatarUrl = { item . avatarUrl }
138
+ LeftIcon = { item . AvatarIcon }
139
+ avatarType = { item . avatarType }
140
+ isIconInverted = { item . isIconInverted }
125
141
placeholderColorSeed = { item . id }
126
- placeholder = { item . name }
127
- size = "md"
128
- type = { item . avatarType ?? 'rounded' }
129
142
/>
130
143
}
131
- text = { item . name }
132
144
/>
133
145
) ;
134
146
} ) }
0 commit comments