Skip to content

Commit fe87bd3

Browse files
committed
fix: euitext broke auto scroll, refactoring
1 parent 844027c commit fe87bd3

File tree

1 file changed

+2
-13
lines changed
  • electron/renderer/components/grid

1 file changed

+2
-13
lines changed

electron/renderer/components/grid/grid.tsx

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { EuiText, useEuiTheme } from '@elastic/eui';
1+
import { useEuiTheme } from '@elastic/eui';
22
import type { SerializedStyles } from '@emotion/react';
33
import { css } from '@emotion/react';
44
import type { ReactNode, RefObject } from 'react';
@@ -15,7 +15,6 @@ import GridLayout from 'react-grid-layout';
1515
import { useWindowDimensions } from '../../hooks/window-dimensions';
1616
import { LocalStorage } from '../../lib/local-storage';
1717
import { GridItem } from '../grid-item';
18-
import { Scrollable } from '../scrollable';
1918

2019
interface GridItemProps {
2120
itemId: string;
@@ -60,14 +59,6 @@ const Grid: React.FC<GridProps> = (props: GridProps): ReactNode => {
6059
`);
6160
}, [windowDimensions, euiTheme]);
6261

63-
const gridItemTextStyles = css({
64-
fontFamily: euiTheme.font.familyCode,
65-
fontSize: euiTheme.size.m,
66-
lineHeight: 'initial',
67-
paddingLeft: euiTheme.size.s,
68-
paddingRight: euiTheme.size.s,
69-
});
70-
7162
/**
7263
* When grid items are resized the increment is based on the the layout size.
7364
* Horizontal resize increments are based on the number of columns.
@@ -216,9 +207,7 @@ const Grid: React.FC<GridProps> = (props: GridProps): ReactNode => {
216207
titleBarText={item!.title}
217208
onClose={onGridItemClose}
218209
>
219-
<Scrollable>
220-
<EuiText css={gridItemTextStyles}>{item!.content}</EuiText>
221-
</Scrollable>
210+
{item!.content}
222211
</GridItem>
223212
);
224213
});

0 commit comments

Comments
 (0)