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

[7.9] [Security Solution] styling for notes' panel (#74274) #74299

Merged
merged 1 commit into from
Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
EuiInMemoryTableProps,
EuiModalBody,
EuiModalHeader,
EuiPanel,
EuiSpacer,
} from '@elastic/eui';
import React, { useState } from 'react';
Expand All @@ -20,7 +19,6 @@ import { Note } from '../../../common/lib/note';
import { AddNote } from './add_note';
import { columns } from './columns';
import { AssociateNote, GetNewNoteId, NotesCount, search, UpdateNote } from './helpers';
import { NOTES_PANEL_WIDTH, NOTES_PANEL_HEIGHT } from '../timeline/properties/notes_size';
import { TimelineStatusLiteral, TimelineStatus } from '../../../../common/types/timeline';

interface Props {
Expand All @@ -32,23 +30,12 @@ interface Props {
updateNote: UpdateNote;
}

const NotesPanel = styled(EuiPanel)`
height: ${NOTES_PANEL_HEIGHT}px;
width: ${NOTES_PANEL_WIDTH}px;

& thead {
display: none;
}
`;

NotesPanel.displayName = 'NotesPanel';

const InMemoryTable: typeof EuiInMemoryTable & { displayName: string } = styled(
EuiInMemoryTable as React.ComponentType<EuiInMemoryTableProps<Note>>
)`
overflow-x: hidden;
overflow-y: auto;
height: 220px;
& thead {
display: none;
}
` as any; // eslint-disable-line @typescript-eslint/no-explicit-any

InMemoryTable.displayName = 'InMemoryTable';
Expand All @@ -60,7 +47,7 @@ export const Notes = React.memo<Props>(
const isImmutable = status === TimelineStatus.immutable;

return (
<NotesPanel>
<>
<EuiModalHeader>
<NotesCount noteIds={noteIds} />
</EuiModalHeader>
Expand All @@ -84,7 +71,7 @@ export const Notes = React.memo<Props>(
sorting={true}
/>
</EuiModalBody>
</NotesPanel>
</>
);
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
*/

export const NOTES_PANEL_WIDTH = 1024;
export const NOTES_PANEL_HEIGHT = 750;