Fix horizontal scrolling issue

Summary: Fixed a layout issue in the list items of GraphQL, background style / line didn't tend to continue when scrolling, because flexbox doesn't grow all lines similarly. Tables do.

Reviewed By: jonathoma

Differential Revision: D21662000

fbshipit-source-id: 767d2d7ffd7e5dacf2c49aa67babbb47a331282c
This commit is contained in:
Michel Weststrate
2020-05-21 03:34:05 -07:00
committed by Facebook GitHub Bot
parent cdd0026e83
commit ed2bcea906

View File

@@ -9,12 +9,16 @@
import React from 'react';
import styled from '@emotion/styled';
import {BackgroundProperty} from 'csstype';
const Scrollable: React.FC<{children: React.ReactNode}> = styled('div')({
type Props = {children: React.ReactNode; background?: BackgroundProperty<any>};
const Scrollable: React.FC<Props> = styled('div')<Props>(({background}) => ({
width: '100%',
height: '100%',
overflow: 'auto',
});
background,
}));
Scrollable.displayName = 'Scrollable';
export default Scrollable;