mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[ResponseOps] Check if we override EuiButton & EuiFilter styles (#222528)
Closes https://github.com/elastic/kibana/issues/220464 ## Summary As part of the EUI button style updates, I reviewed the RO files for any CSS class overrides affecting `euiButton` and `euiFilter` components. I found some custom CSS overrides and I was able to safely remove them. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
b3da573631
commit
e987cdbb55
5 changed files with 8 additions and 46 deletions
|
@ -11,13 +11,14 @@ import {
|
|||
EuiContextMenuPanelDescriptor,
|
||||
EuiContextMenuPanelItemDescriptor,
|
||||
useEuiTheme,
|
||||
EuiButtonEmpty,
|
||||
} from '@elastic/eui';
|
||||
import { EuiPopover } from '@elastic/eui';
|
||||
import React, { useCallback, useMemo, useState } from 'react';
|
||||
import type { FieldSpec } from '@kbn/data-views-plugin/common';
|
||||
import { CustomFieldPanel } from './custom_field_panel';
|
||||
import * as i18n from '../translations';
|
||||
import { StyledContextMenu, StyledEuiButtonEmpty } from '../styles';
|
||||
import { StyledContextMenu } from '../styles';
|
||||
|
||||
export interface GroupSelectorProps {
|
||||
'data-test-subj'?: string;
|
||||
|
@ -123,7 +124,7 @@ const GroupSelectorComponent = ({
|
|||
return optionsTitle ? [optionsTitle, selection.label].join(', ') : selection.label;
|
||||
}, '');
|
||||
return (
|
||||
<StyledEuiButtonEmpty
|
||||
<EuiButtonEmpty
|
||||
data-test-subj="group-selector-dropdown"
|
||||
flush="both"
|
||||
iconSide="right"
|
||||
|
@ -134,7 +135,7 @@ const GroupSelectorComponent = ({
|
|||
size="xs"
|
||||
>
|
||||
{`${title}: ${buttonLabel}`}
|
||||
</StyledEuiButtonEmpty>
|
||||
</EuiButtonEmpty>
|
||||
);
|
||||
}, [groupsSelected, isGroupSelected, onButtonClick, selectedOptions, title]);
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { EuiButtonEmpty, EuiContextMenu, type EuiThemeComputed } from '@elastic/eui';
|
||||
import { EuiContextMenu } from '@elastic/eui';
|
||||
import type { EuiThemeComputed } from '@elastic/eui';
|
||||
import { euiStyled } from '@kbn/kibana-react-plugin/common';
|
||||
import { css } from '@emotion/react';
|
||||
|
||||
|
@ -88,14 +89,3 @@ export const StyledContextMenu = euiStyled(EuiContextMenu)<{ border: EuiThemeCom
|
|||
border: none;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledEuiButtonEmpty = euiStyled(EuiButtonEmpty)`
|
||||
font-weight: 'normal';
|
||||
|
||||
.euiButtonEmpty__text {
|
||||
max-width: 300px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
`;
|
||||
|
|
|
@ -18,7 +18,6 @@ import {
|
|||
EuiIcon,
|
||||
} from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { css } from '@emotion/react';
|
||||
import { CoreStart } from '@kbn/core/public';
|
||||
import { useFetchStream } from '@kbn/ml-response-stream/client';
|
||||
|
||||
|
@ -148,11 +147,6 @@ export const StreamingResponse = ({
|
|||
<EuiPanel color="primary">
|
||||
<EuiAccordion
|
||||
id={`streamingResponse`}
|
||||
css={css`
|
||||
.euiButtonIcon {
|
||||
color: ${euiTheme.colors.textPrimary};
|
||||
}
|
||||
`}
|
||||
buttonContent={
|
||||
<EuiFlexGroup direction="row" alignItems="center">
|
||||
<EuiFlexItem grow>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
import React, { useCallback } from 'react';
|
||||
import { EuiFilterGroup, EuiFilterButton } from '@elastic/eui';
|
||||
|
||||
import { css } from '@emotion/react';
|
||||
import type { CaseUserActionsStats } from '../../containers/types';
|
||||
import * as i18n from './translations';
|
||||
import type { UserActivityFilter } from './types';
|
||||
|
@ -32,22 +31,9 @@ export const FilterActivity = React.memo<FilterActivityProps>(
|
|||
);
|
||||
|
||||
return (
|
||||
<EuiFilterGroup
|
||||
data-test-subj="user-actions-filter-activity-group"
|
||||
css={css`
|
||||
> .euiFilterButton-hasNotification {
|
||||
min-width: 68px;
|
||||
}
|
||||
`}
|
||||
>
|
||||
<EuiFilterGroup data-test-subj="user-actions-filter-activity-group">
|
||||
<EuiFilterButton
|
||||
withNext
|
||||
css={css`
|
||||
&,
|
||||
& .euiFilterButton__text {
|
||||
min-width: 28px;
|
||||
}
|
||||
`}
|
||||
grow={false}
|
||||
onClick={() => handleFilterChange('all')}
|
||||
isToggle
|
||||
|
|
|
@ -8,9 +8,8 @@
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { KueryNode } from '@kbn/es-query';
|
||||
import React, { useMemo, useCallback, useState } from 'react';
|
||||
import { css } from '@emotion/react';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { EuiButtonEmpty, EuiFlexItem, EuiFlexGroup, useEuiTheme } from '@elastic/eui';
|
||||
import { EuiButtonEmpty, EuiFlexItem, EuiFlexGroup } from '@elastic/eui';
|
||||
|
||||
import { RuleTableItem, BulkEditActions, UpdateRulesToBulkEditProps } from '../../../../types';
|
||||
import {
|
||||
|
@ -54,13 +53,6 @@ export const RuleQuickEditButtons: React.FunctionComponent<ComponentOpts> = ({
|
|||
notifications: { toasts },
|
||||
} = useKibana().services;
|
||||
|
||||
const { euiTheme } = useEuiTheme();
|
||||
|
||||
const bulkDeleteButtonCss = css`
|
||||
.euiButtonEmpty__text {
|
||||
padding-top: ${euiTheme.size.xs};
|
||||
}
|
||||
`;
|
||||
const [isUntrackAlertsModalOpen, setIsUntrackAlertsModalOpen] = useState<boolean>(false);
|
||||
|
||||
const isPerformingAction = isEnablingRules || isDisablingRules || isBulkEditing;
|
||||
|
@ -367,7 +359,6 @@ export const RuleQuickEditButtons: React.FunctionComponent<ComponentOpts> = ({
|
|||
color="danger"
|
||||
isDisabled={isPerformingAction || hasDisabledByLicenseRuleTypes}
|
||||
data-test-subj="bulkDelete"
|
||||
css={bulkDeleteButtonCss}
|
||||
className="actBulkActionPopover__deleteAll"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue