Skip to content

Commit

Permalink
CSS fixes to keep fixed widths instead of percentages
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Jul 18, 2024
1 parent 3185e6c commit afa5d6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import React, { type FC } from 'react';
import { css } from '@emotion/react';

import { EuiTabbedContent } from '@elastic/eui';
import { useEuiTheme, EuiTabbedContent } from '@elastic/eui';

import { i18n } from '@kbn/i18n';
import { stringHash } from '@kbn/ml-string-hash';
Expand All @@ -30,6 +30,7 @@ interface Props {
}

export const ExpandedRow: FC<Props> = ({ item, onAlertEdit }) => {
const { euiTheme } = useEuiTheme();
const tabId = stringHash(item.id);

const tabs = [
Expand Down Expand Up @@ -112,7 +113,8 @@ export const ExpandedRow: FC<Props> = ({ item, onAlertEdit }) => {
onTabClick={() => {}}
expand={false}
css={css`
width: 100%;
margin-left: -${euiTheme.size.xl};
width: calce(100% + ${euiTheme.size.xl});
.euiTable {
background-color: transparent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import type { MouseEvent } from 'react';
import React, { useState, type FC } from 'react';

import type { EuiBasicTableProps } from '@elastic/eui';
import { useEuiTheme, type EuiBasicTableProps } from '@elastic/eui';
import { formatDate, EuiPanel, EuiBasicTable, EuiToolTip, EuiButtonIcon } from '@elastic/eui';

import { i18n } from '@kbn/i18n';
Expand All @@ -30,6 +30,7 @@ interface Sorting {
}

export const ExpandedRowMessagesPane: FC<ExpandedRowMessagesPaneProps> = ({ transformId }) => {
const { euiTheme } = useEuiTheme();
const { showNodeInfo } = useEnabledFeatures();

const [pageIndex, setPageIndex] = useState(0);
Expand Down Expand Up @@ -79,8 +80,12 @@ export const ExpandedRowMessagesPane: FC<ExpandedRowMessagesPaneProps> = ({ tran
) : (
''
),
render: (message: TransformMessage) => <JobIcon message={message} />,
width: '6%',
render: (message: TransformMessage) => (
<div css={{ marginLeft: `-${euiTheme.base * 1.75}px` }}>
<JobIcon message={message} />
</div>
),
width: euiTheme.size.xl,
},
{
field: 'timestamp',
Expand Down

0 comments on commit afa5d6d

Please sign in to comment.