forked from twentyhq/twenty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Current workspace member filter (twentyhq#8016) (twentyhq#9182)
New branch based on feedback in PR twentyhq#8950 and issue twentyhq#8016 --------- Co-authored-by: ad-elias <elias@autodiligence.com> Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
- Loading branch information
1 parent
1f52a45
commit 3f52c67
Showing
29 changed files
with
347 additions
and
155 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
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
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
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
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
45 changes: 45 additions & 0 deletions
45
...object-record/object-filter-dropdown/components/ObjectFilterDropdownRecordPinnedItems.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,45 @@ | ||
import { StyledMultipleSelectDropdownAvatarChip } from '@/object-record/select/components/StyledMultipleSelectDropdownAvatarChip'; | ||
import { SelectableItem } from '@/object-record/select/types/SelectableItem'; | ||
import styled from '@emotion/styled'; | ||
import { MenuItemMultiSelectAvatar } from 'twenty-ui'; | ||
|
||
const StyledPinnedItemsContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
padding: ${({ theme }) => theme.spacing(1)}; | ||
`; | ||
|
||
export const ObjectFilterDropdownRecordPinnedItems = (props: { | ||
selectableItems: SelectableItem[]; | ||
onChange: ( | ||
selectableItem: SelectableItem, | ||
isNewCheckedValue: boolean, | ||
) => void; | ||
}) => { | ||
return ( | ||
<StyledPinnedItemsContainer> | ||
{props.selectableItems.map((selectableItem) => { | ||
return ( | ||
<MenuItemMultiSelectAvatar | ||
key={selectableItem.id} | ||
selected={selectableItem.isSelected} | ||
onSelectChange={(newCheckedValue) => { | ||
props.onChange(selectableItem, newCheckedValue); | ||
}} | ||
avatar={ | ||
<StyledMultipleSelectDropdownAvatarChip | ||
className="avatar-icon-container" | ||
name={selectableItem.name} | ||
avatarUrl={selectableItem.avatarUrl} | ||
LeftIcon={selectableItem.AvatarIcon} | ||
avatarType={selectableItem.avatarType} | ||
isIconInverted={selectableItem.isIconInverted} | ||
placeholderColorSeed={selectableItem.id} | ||
/> | ||
} | ||
/> | ||
); | ||
})} | ||
</StyledPinnedItemsContainer> | ||
); | ||
}; |
Oops, something went wrong.