Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SecuritySolutuion] Fix misaligned toolbar in alerts table #196804

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const AlertsCount = ({ count }: { count: number }) => {
border-right: ${euiTheme.border.thin};
margin-right: ${euiTheme.size.s};
padding-right: ${euiTheme.size.m};
align-self: center;
`}
>
{alertCountText}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { EuiText, EuiToolTip } from '@elastic/eui';
import { FormattedRelative } from '@kbn/i18n-react';
import React, { useEffect, useMemo, useState } from 'react';

import { css } from '@emotion/react';
import * as i18n from './translations';

export interface LastUpdatedAtProps {
Expand Down Expand Up @@ -36,6 +37,12 @@ Updated.displayName = 'Updated';

const prefix = ` ${i18n.UPDATED} `;

const anchorStyles = {
css: css`
align-self: center;
`,
};

export const LastUpdatedAt = React.memo<LastUpdatedAtProps>(
({ compact = false, updatedAt, showUpdating = false }) => {
const [date, setDate] = useState(Date.now());
Expand Down Expand Up @@ -64,7 +71,10 @@ export const LastUpdatedAt = React.memo<LastUpdatedAtProps>(
}, [compact, date, showUpdating, updatedAt]);

return (
<EuiToolTip content={<Updated date={date} prefix={prefix} updatedAt={updatedAt} />}>
<EuiToolTip
content={<Updated date={date} prefix={prefix} updatedAt={updatedAt} />}
anchorProps={anchorStyles}
>
<EuiText color="subdued" size="xs" data-test-subj="toolbar-updated-at">
{updateText}
</EuiText>
Expand Down