Skip to content

Commit

Permalink
cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelolo24 committed Sep 15, 2022
1 parent aef1cc8 commit be85678
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,17 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { EuiPanel } from '@elastic/eui';
import React from 'react';
import styled from 'styled-components';

import { FLYOUT_BUTTON_BAR_CLASS_NAME } from '../../timeline/helpers';
import { FlyoutHeaderPanel } from '../header';

const DataProvidersPanel = styled(EuiPanel)`
border-radius: 0;
padding: 0 4px 0 4px;
user-select: none;
z-index: ${({ theme }) => theme.eui.euiZLevel9};
`;

interface FlyoutBottomBarProps {
activeTab: TimelineTabs;
showDataproviders: boolean;
timelineId: string;
}

export const FlyoutBottomBar = React.memo<FlyoutBottomBarProps>(
({ activeTab, showDataproviders, timelineId }) => {
({ showDataproviders, timelineId }) => {
return (
<div className={FLYOUT_BUTTON_BAR_CLASS_NAME} data-test-subj="flyoutBottomBar">
{showDataproviders && <FlyoutHeaderPanel timelineId={timelineId} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const FlyoutComponent: React.FC<OwnProps> = ({ timelineId, onAppLeave }) => {
<EuiFocusTrap disabled={!focusOwnership}>
<Pane timelineId={timelineId} visible={show} />
</EuiFocusTrap>
<FlyoutBottomBar activeTab={activeTab} timelineId={timelineId} showDataproviders={!show} />
<FlyoutBottomBar timelineId={timelineId} showDataproviders={!show} />
</>
</EuiOutsideClickDetector>
);
Expand Down

0 comments on commit be85678

Please sign in to comment.