Skip to content

Commit

Permalink
changed sampledatabox to euicard, changed style incompatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Galitzky <[email protected]>
  • Loading branch information
amitgalitz committed Apr 6, 2022
1 parent e10395f commit 61c319b
Show file tree
Hide file tree
Showing 7 changed files with 498 additions and 843 deletions.
8 changes: 3 additions & 5 deletions public/components/ContentPanel/ContentPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ type ContentPanelProps = {
hideBody?: boolean;
titleDataTestSubj?: string;
};

const ContentPanel = (props: ContentPanelProps) => {
const titleDataTestSubj = get(
props,
Expand All @@ -50,12 +49,11 @@ const ContentPanel = (props: ContentPanelProps) => {
);
return (
<EuiPanel
style={{ padding: '20px', ...props.panelStyles }}
style={{ padding: '20px'}}
className={props.contentPanelClassName}
betaBadgeLabel={props.badgeLabel}
>
<EuiFlexGroup
style={{ padding: '0px', ...props.titleContainerStyles }}
style={{ padding: '0px' }}
justifyContent="spaceBetween"
alignItems="center"
>
Expand Down Expand Up @@ -135,7 +133,7 @@ const ContentPanel = (props: ContentPanelProps) => {
margin="s"
className={props.horizontalRuleClassName}
/>
<div style={{ padding: '10px 0px', ...props.bodyStyles }}>
<div style={{ padding: '10px 0px' }}>
{props.children}
</div>
</div>
Expand Down
16 changes: 12 additions & 4 deletions public/pages/Overview/components/SampleDataBox/SampleDataBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import {
EuiFlexItem,
EuiTitle,
EuiLink,
EuiCard,
EuiHorizontalRule,
} from '@elastic/eui';
import { PLUGIN_NAME } from '../../../../utils/constants';

Expand All @@ -37,7 +39,7 @@ interface SampleDataBoxProps {
export const SampleDataBox = (props: SampleDataBoxProps) => {
return (
<div style={{ height: 'auto' }}>
<ContentPanel
<EuiCard
title={
<div
style={{
Expand All @@ -62,9 +64,15 @@ export const SampleDataBox = (props: SampleDataBoxProps) => {
</div>
}
titleSize="s"
badgeLabel={props.isDataLoaded ? 'INSTALLED' : undefined}
betaBadgeLabel={props.isDataLoaded ? 'INSTALLED' : undefined}
paddingSize='l'
>
<EuiFlexGroup direction="column" gutterSize="l">
<EuiHorizontalRule
size="full"
margin="s"
>
</EuiHorizontalRule>
<EuiFlexItem grow={false} style={{ height: '70px' }}>
<p
style={{
Expand Down Expand Up @@ -118,7 +126,7 @@ export const SampleDataBox = (props: SampleDataBoxProps) => {
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexGroup>
</ContentPanel>
</EuiCard>
</div>
);
};
};
Loading

0 comments on commit 61c319b

Please sign in to comment.