Make view scrollable if error message is long

Summary:
Bug:

{F231521873}

Reviewed By: mweststrate

Differential Revision: D20460428

fbshipit-source-id: 1ea7cbef2bd7c173defd0b056641abc87e66f93c
This commit is contained in:
Pritesh Nandgaonkar
2020-03-16 05:20:11 -07:00
committed by Facebook GitHub Bot
parent f889dc5e40
commit 4784c45778
2 changed files with 3 additions and 1 deletions

View File

@@ -46,7 +46,7 @@ export default class Popover extends PureComponent<Props> {
return null;
}
return (
<VBox>
<VBox scrollable={true} maxHeight={300}>
<Info type="error">
<Title bold>
The following errors occurred while exporting your data

View File

@@ -12,6 +12,7 @@ import styled from '@emotion/styled';
type Props = {
grow?: boolean;
scrollable?: boolean;
maxHeight?: number;
};
const View = styled.div<Props>(props => ({
@@ -19,6 +20,7 @@ const View = styled.div<Props>(props => ({
overflow: props.scrollable ? 'auto' : 'visible',
position: 'relative',
width: props.grow ? '100%' : 'auto',
maxHeight: props.maxHeight,
}));
View.displayName = 'View';