【发布时间】:2020-03-21 07:40:35
【问题描述】:
我在我的 React 应用程序中使用 Material-UI。我还在使用样式化组件,并且正在 Chrome 浏览器中查看应用程序。使用 Firefox 浏览器时不会出现我遇到的问题。
在我的样式化组件中应用溢出属性时,我看到这条蓝线朝向模式的底部。这仅在我使用浏览器窗口的大小时才会出现。随着我逐渐使浏览器窗口接近正常大小,这条线消失了。我不确定这是为什么,或者我可以做些什么来解决它。
这是我的代码的 sn-p:
export const ScrollableModal = styled(MUIModal)(() => ({
overflow: 'scroll',
}));
const Modal = ({ title, children, actionsLeft, actionsRight, ...rest }) => {
const wrappedTitle =
typeof title === 'string' ? <Typography>{title}</Typography> : title;
return (
<ScrollableModal {...rest}>
<Container>
其余的我都省略了,因为它与我的问题无关。
这是我所描述内容的屏幕截图:
【问题讨论】:
标签: javascript reactjs google-chrome material-ui