ConfirmWrapper: Fixed Scrollbar wrapper usage if height property set

This commit is contained in:
Ilya Oleshko 2023-10-13 17:25:00 +03:00
parent 9d6a5fe708
commit 0577ebe6f8

View File

@ -47,13 +47,16 @@ const BgBlock = styled.div`
const ConfirmWrapper = (props) => { const ConfirmWrapper = (props) => {
const { children, currentColorScheme, height } = props; const { children, currentColorScheme, height } = props;
const bgPattern = getBgPattern(currentColorScheme?.id); const bgPattern = getBgPattern(currentColorScheme?.id);
const content = (
<>
<BgBlock bgPattern={bgPattern} />
{children}
</>
);
return ( return (
<StyledWrapper height={height}> <StyledWrapper height={height}>
<Scrollbar> {!!height ? content : <Scrollbar>{content}</Scrollbar>}
<BgBlock bgPattern={bgPattern} />
{children}
</Scrollbar>
</StyledWrapper> </StyledWrapper>
); );
}; };