Fix: Inline Phone Field Menu (#4383)

* #4343 fix: phone menu display on page

* Add the possibility to send width as %

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
Jeet Desai
2024-03-11 21:08:37 +05:30
committed by GitHub
parent c82c60b448
commit 7231ea1e72
3 changed files with 3 additions and 2 deletions

View File

@ -120,6 +120,7 @@ export const CountryPickerDropdownButton = ({
return (
<Dropdown
dropdownMenuWidth={'100%'}
dropdownId="country-picker-dropdown-id"
dropdownHotkeyScope={{ scope: CountryPickerHotkeyScope.CountryPicker }}
clickableComponent={

View File

@ -33,7 +33,7 @@ type DropdownProps = {
dropdownHotkeyScope: HotkeyScope;
dropdownId: string;
dropdownPlacement?: Placement;
dropdownMenuWidth?: `${string}px` | 'auto' | number;
dropdownMenuWidth?: `${string}px` | `${number}%` | 'auto' | number;
dropdownOffset?: { x?: number; y?: number };
onClickOutside?: () => void;
onClose?: () => void;

View File

@ -2,7 +2,7 @@ import styled from '@emotion/styled';
const StyledDropdownMenu = styled.div<{
disableBlur?: boolean;
width?: `${string}px` | 'auto' | number;
width?: `${string}px` | `${number}%` | 'auto' | number;
}>`
backdrop-filter: ${({ disableBlur }) => (disableBlur ? 'none' : 'blur(8px)')};
background: ${({ theme }) => theme.background.transparent.secondary};