Skip to content

Commit

Permalink
Fix styling to use EuiSize constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter committed Nov 23, 2022
1 parent cf28f3d commit 9398634
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,7 @@
.optionsList--hiddenEditorForm {
margin-left: $euiSizeXXL + $euiSizeM;
}

.optionsList--sortPopover {
width: $euiSizeXL * 7;
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
} from '@elastic/eui';
import { useReduxEmbeddableContext } from '@kbn/presentation-util-plugin/public';

import { css } from '@emotion/css';
import {
getCompatibleSortingTypes,
DEFAULT_SORT,
Expand All @@ -35,8 +34,6 @@ import { OptionsListReduxState } from '../types';
import { OptionsListStrings } from './options_list_strings';
import { optionsListReducers } from '../options_list_reducers';

const SORT_POPOVER_WIDTH = 220;

interface OptionsListSortingPopoverProps {
showOnlySelected: boolean;
}
Expand Down Expand Up @@ -121,9 +118,7 @@ export const OptionsListPopoverSortingButton = ({
isOpen={isSortingPopoverOpen}
aria-labelledby="optionsList_sortingOptions"
closePopover={() => setIsSortingPopoverOpen(false)}
panelStyle={{
width: `${SORT_POPOVER_WIDTH}px`,
}}
panelClassName={'optionsList--sortPopover'}
>
<span data-test-subj="optionsListControl__sortingOptionsPopover">
<EuiPopoverTitle paddingSize="s">
Expand All @@ -149,9 +144,6 @@ export const OptionsListPopoverSortingButton = ({
listProps={{ bordered: false }}
data-test-subj="optionsListControl__sortingOptions"
aria-label={OptionsListStrings.popover.getSortPopoverDescription()}
css={css`
max-width: ${SORT_POPOVER_WIDTH}px !important;
`}
>
{(list) => list}
</EuiSelectable>
Expand Down

0 comments on commit 9398634

Please sign in to comment.