Skip to content

Commit b4fd78e

Browse files
committed
feat(grid): move style properties to EuiFlexItem for better encapsulation
1 parent d8022c1 commit b4fd78e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

electron/renderer/components/grid/grid-item.tsx

+11-5
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,6 @@ export const GridItem: React.FC<GridItemProps> = memo(
338338
css={{
339339
height: 'inherit',
340340
width: 'inherit',
341-
fontSize: style.fontSize,
342-
fontFamily: style.fontFamily,
343-
color: style.foregroundColor,
344-
backgroundColor: style.backgroundColor,
345341
}}
346342
>
347343
<EuiSplitPanel.Inner grow={false} color="subdued" paddingSize="none">
@@ -402,7 +398,17 @@ export const GridItem: React.FC<GridItemProps> = memo(
402398
justifyContent="flexStart"
403399
gutterSize="none"
404400
>
405-
<EuiFlexItem grow={true}>{children}</EuiFlexItem>
401+
<EuiFlexItem
402+
grow={true}
403+
css={{
404+
fontSize: style.fontSize,
405+
fontFamily: style.fontFamily,
406+
color: style.foregroundColor,
407+
backgroundColor: style.backgroundColor,
408+
}}
409+
>
410+
{children}
411+
</EuiFlexItem>
406412
<EuiFlexItem grow={false}>
407413
<div
408414
ref={resizeHandleRef}

0 commit comments

Comments
 (0)