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

Align all flyout components to be overlay kind and add close button X in header #373

Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,13 @@ Object {
justifyContent="flexStart"
>
<EuiFlexItem>
<EuiFlexGroup
alignItems="center"
<EuiTitle
size="m"
>
<EuiFlexItem>
<EuiTitle
size="m"
>
<h3>
Alerts by undefined
</h3>
</EuiTitle>
</EuiFlexItem>
</EuiFlexGroup>
<h3>
Alerts by undefined
</h3>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem
grow={false}
Expand Down
30 changes: 12 additions & 18 deletions public/components/Flyout/flyouts/alertsDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@
*/

import React from 'react';
import {
EuiButtonEmpty,
EuiText,
EuiFlexGroup,
EuiButtonIcon,
EuiTitle,
EuiFlexItem,
EuiButton,
} from '@elastic/eui';
import { EuiFlexGroup, EuiButtonIcon, EuiTitle, EuiFlexItem } from '@elastic/eui';
import AlertsDashboardFlyoutComponent from './components/AlertsDashboardFlyoutComponent';

const alertsDashboard = (payload) => {
Expand All @@ -27,17 +19,19 @@ const alertsDashboard = (payload) => {
headerProps: { hasBorder: true },
header: (
<EuiFlexGroup justifyContent="flexStart" alignItems="center">
<EuiFlexItem>
<EuiFlexGroup alignItems="center">
<EuiFlexItem>
<EuiTitle size={'m'}>
<h3>{`Alerts by ${trigger_name}`}</h3>
</EuiTitle>
</EuiFlexItem>
</EuiFlexGroup>
<EuiFlexItem className="eui-xScrollWithShadows">
<EuiTitle size={'m'} data-test-subj={`alertsDashboardFlyout_header_${trigger_name}`}>
<h3>{`Alerts by ${trigger_name}`}</h3>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonIcon iconType="cross" display="empty" iconSize="m" onClick={closeFlyout} />
<EuiButtonIcon
data-test-subj={`alertsDashboardFlyout_closeButton_${trigger_name}`}
iconType="cross"
display="empty"
iconSize="m"
onClick={closeFlyout}
/>
</EuiFlexItem>
</EuiFlexGroup>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
import React, { Component } from 'react';
import _ from 'lodash';
import {
EuiButtonEmpty,
EuiCodeBlock,
EuiFlexGrid,
EuiFlexItem,
EuiFlyout,
EuiFlyoutBody,
EuiFlyoutFooter,
EuiFlyoutHeader,
EuiHorizontalRule,
EuiLink,
Expand Down Expand Up @@ -109,14 +107,10 @@ export default class FindingFlyout extends Component {
>
<EuiFlyoutHeader hasBorder>
<EuiFlexGroup justifyContent="flexStart" alignItems="center">
<EuiFlexItem>
<EuiFlexGroup alignItems="center">
<EuiFlexItem>
<EuiTitle size={'m'}>
<h3 id={findingId || `temp_finding_${docId}`}>Document finding</h3>
</EuiTitle>
</EuiFlexItem>
</EuiFlexGroup>
<EuiFlexItem className="eui-xScrollWithShadows">
<EuiTitle size={'m'}>
amsiglan marked this conversation as resolved.
Show resolved Hide resolved
<h3 id={findingId || `temp_finding_${docId}`}>Document finding</h3>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonIcon
Expand Down