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:
committed by
Facebook GitHub Bot
parent
cdd0026e83
commit
ed2bcea906
@@ -9,12 +9,16 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from '@emotion/styled';
|
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%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
overflow: 'auto',
|
overflow: 'auto',
|
||||||
});
|
background,
|
||||||
|
}));
|
||||||
Scrollable.displayName = 'Scrollable';
|
Scrollable.displayName = 'Scrollable';
|
||||||
|
|
||||||
export default Scrollable;
|
export default Scrollable;
|
||||||
|
|||||||
Reference in New Issue
Block a user