Skip to content

Commit

Permalink
[ML] Update styling
Browse files Browse the repository at this point in the history
  • Loading branch information
qn895 committed Dec 15, 2020
1 parent 3305f1a commit 0dcdf2e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@import 'file_based/index';
@import 'index_based/index';
@import "stats_datagrid/index";
@import 'stats_datagrid/index';
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import React, { FC, ReactNode } from 'react';
import { EuiBasicTable, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { EuiBasicTable, EuiFlexItem } from '@elastic/eui';
// @ts-ignore
import { formatDate } from '@elastic/eui/lib/services/format';
import { FormattedMessage } from '@kbn/i18n/react';
Expand Down Expand Up @@ -62,19 +62,17 @@ export const DateContent: FC<FieldDataCardProps> = ({ config }) => {
];

return (
<EuiFlexGroup direction={'row'}>
<EuiFlexItem>
<ExpandedRowFieldHeader>{summaryTableTitle}</ExpandedRowFieldHeader>
<EuiBasicTable<SummaryTableItem>
className={'mlDataVisualizerSummaryTable'}
data-test-subj={'mlDateSummaryTable'}
compressed
items={summaryTableItems}
columns={summaryTableColumns}
tableCaption={summaryTableTitle}
tableLayout="auto"
/>
</EuiFlexItem>
</EuiFlexGroup>
<EuiFlexItem>
<ExpandedRowFieldHeader>{summaryTableTitle}</ExpandedRowFieldHeader>
<EuiBasicTable<SummaryTableItem>
className={'mlDataVisualizerSummaryTable'}
data-test-subj={'mlDateSummaryTable'}
compressed
items={summaryTableItems}
columns={summaryTableColumns}
tableCaption={summaryTableTitle}
tableLayout="auto"
/>
</EuiFlexItem>
);
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@

.mlTopValuesLabelContainer {
padding-right: $euiSizeM;

&.small {
&.mlTopValuesLabelContainer--small {
width: 50px !important;
}

&.large {
&.mlTopValuesLabelContainer--large {
width: 200px !important;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const TopValues: FC<Props> = ({ stats, fieldFormat, barColor, compressed
className={classNames(
'eui-textTruncate',
'mlTopValuesLabelContainer',
compressed === true ? 'small' : 'large'
`mlTopValuesLabelContainer--${compressed === true ? 'small' : 'large'}`
)}
>
<EuiToolTip content={kibanaFieldFormat(value.key, fieldFormat)} position="right">
Expand Down

0 comments on commit 0dcdf2e

Please sign in to comment.