Skip to content

Commit

Permalink
Logged-in Performance Profiler: Fix PageSelector size when expanded (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zaguiini authored Sep 17, 2024
1 parent 869c878 commit 39816bf
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions client/hosting/performance/components/PageSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
import { SearchableDropdown } from '@automattic/components';
import { translate } from 'i18n-calypso';
import { useTranslate } from 'i18n-calypso';
import { ComponentProps } from 'react';

export const PageSelector = ( props: ComponentProps< typeof SearchableDropdown > ) => {
const translate = useTranslate();

return (
<div
css={ {
display: 'flex',
alignItems: 'center',
alignItems: 'flex-start',
flexGrow: 1,
justifyContent: 'flex-end',
gap: '10px',
maxHeight: '40px',
} }
>
<div>{ translate( 'Page' ) }</div>
<div css={ { alignSelf: 'stretch', display: 'flex', alignItems: 'center' } }>
{ translate( 'Page' ) }
</div>
<SearchableDropdown
{ ...props }
css={ {
maxWidth: '240px',
minWidth: '240px',
'.components-combobox-control__suggestions-container': {
position: 'relative',
zIndex: 1,
background: 'var(--color-surface)',
},
'.components-form-token-field__suggestions-list': { maxHeight: 'initial !important' },
'.components-form-token-field__suggestions-list li': { padding: '0 !important' },
} }
Expand Down

0 comments on commit 39816bf

Please sign in to comment.