fix: Relation picker UX improvements (#7292)

Closes https://github.com/twentyhq/twenty/issues/7287

> [!Note]
> This PR solves the issue #7287
> Updated margins between button and seperator and gave seperator full
width

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Harshit Singh 2024-10-09 21:46:44 +05:30 committed by GitHub
parent df395333c1
commit 0e01ddf7f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,6 +23,7 @@ import { useRecoilValue, useSetRecoilState } from 'recoil';
import { Key } from 'ts-key-enum';
import { IconPlus, isDefined } from 'twenty-ui';
import { useDebouncedCallback } from 'use-debounce';
export const StyledSelectableItem = styled(SelectableItem)`
height: 100%;
width: 100%;
@ -144,19 +145,19 @@ export const MultiRecordSelect = ({
)}
</>
)}
{isDefined(onCreate) && (
<>
{objectRecordsIdsMultiSelect.length > 0 && (
<DropdownMenuSeparator />
)}
</DropdownMenuItemsContainer>
{isDefined(onCreate) && (
<>
<DropdownMenuSeparator />
<DropdownMenuItemsContainer>
<CreateNewButton
onClick={debouncedOnCreate}
LeftIcon={IconPlus}
text="Add New"
/>
</>
)}
</DropdownMenuItemsContainer>
</DropdownMenuItemsContainer>
</>
)}
</DropdownMenu>
</>
);