Skip to content

Commit

Permalink
[Security Solution] styling for notes' panel (#74274)
Browse files Browse the repository at this point in the history
* styling for notes' pannel

* styling

* remove additional const

* styling
  • Loading branch information
angorayc committed Aug 4, 2020
1 parent 56a3ef4 commit e553f4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
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;

0 comments on commit e553f4d

Please sign in to comment.