Skip to content

Commit ad3b4f3

Browse files
author
Enrique Moreno
committed
Fixed problem with vertical alignment in overlay mode
1 parent 4bad383 commit ad3b4f3

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

packages/lib/src/progress-bar/ProgressBar.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,24 @@ import ProgressBarPropsType from "./types";
55
import DxcFlex from "../flex/Flex";
66
import { auxTextStyles, labelTextStyles, textColorStyles } from "./utils";
77

8-
const ProgressBarContainer = styled.div`
8+
const ProgressBarContainer = styled.div<{
9+
overlay: ProgressBarPropsType["overlay"];
10+
}>`
911
display: flex;
1012
flex-wrap: wrap;
1113
min-width: 100px;
1214
width: 100%;
15+
${({ overlay }) =>
16+
overlay &&
17+
`
18+
position: fixed;
19+
inset: 0;
20+
display: flex;
21+
align-items: center;
22+
justify-content: center;
23+
height: 100%;
24+
z-index: 1300;
25+
`}
1326
`;
1427

1528
const Overlay = styled.div`
@@ -141,7 +154,7 @@ const DxcProgressBar = ({
141154
}, [value]);
142155

143156
return (
144-
<ProgressBarContainer>
157+
<ProgressBarContainer overlay={overlay}>
145158
{overlay && <Overlay />}
146159
<MainContainer overlay={overlay} margin={margin}>
147160
<DxcFlex justifyContent="space-between">

0 commit comments

Comments
 (0)