@npm_leadtech/legal-lib-components 5.11.12 → 5.11.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/components/atoms/MenuItems/MenuItemProps.types.d.ts +1 -0
- package/dist/src/components/atoms/MenuItems/MenuItemProps.types.ts +1 -0
- package/dist/src/components/molecules/BottomOverlay/BottomOverlay.js +12 -0
- package/dist/src/components/molecules/BottomOverlay/BottomOverlay.tsx +12 -0
- package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCard.styled.js +7 -0
- package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCard.styled.ts +7 -0
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ const BottomOverlay = ({ givenClass, header, body, open = false, onClose, footer
|
|
|
9
9
|
const overlayBackground = useRef(null);
|
|
10
10
|
const overlayMessage = useRef(null);
|
|
11
11
|
useEffect(() => {
|
|
12
|
+
handleBodyScroll(open);
|
|
12
13
|
if (open) {
|
|
13
14
|
const backgroundElement = overlayBackground.current;
|
|
14
15
|
backgroundElement.addEventListener('mousedown', handleCloseModal);
|
|
@@ -17,6 +18,17 @@ const BottomOverlay = ({ givenClass, header, body, open = false, onClose, footer
|
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
}, [open]);
|
|
21
|
+
const handleBodyScroll = (disableScroll) => {
|
|
22
|
+
if (disableScroll) {
|
|
23
|
+
document.body.style.overflow = 'hidden';
|
|
24
|
+
document.body.style.position = 'fixed';
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
document.body.style.overflow = 'unset';
|
|
28
|
+
document.body.style.position = 'relative';
|
|
29
|
+
document.body.style.width = '100%';
|
|
30
|
+
}
|
|
31
|
+
};
|
|
20
32
|
const handleCloseModal = (event) => {
|
|
21
33
|
if (onClose != null)
|
|
22
34
|
onClose();
|
|
@@ -12,6 +12,7 @@ const BottomOverlay: FC<BottomOverlayProps> = ({ givenClass, header, body, open
|
|
|
12
12
|
const overlayMessage = useRef<HTMLDivElement | null>(null)
|
|
13
13
|
|
|
14
14
|
useEffect(() => {
|
|
15
|
+
handleBodyScroll(open)
|
|
15
16
|
if (open) {
|
|
16
17
|
const backgroundElement = overlayBackground.current as HTMLElement
|
|
17
18
|
backgroundElement.addEventListener('mousedown', handleCloseModal)
|
|
@@ -21,6 +22,17 @@ const BottomOverlay: FC<BottomOverlayProps> = ({ givenClass, header, body, open
|
|
|
21
22
|
}
|
|
22
23
|
}, [open])
|
|
23
24
|
|
|
25
|
+
const handleBodyScroll = (disableScroll: boolean): void => {
|
|
26
|
+
if (disableScroll) {
|
|
27
|
+
document.body.style.overflow = 'hidden'
|
|
28
|
+
document.body.style.position = 'fixed'
|
|
29
|
+
} else {
|
|
30
|
+
document.body.style.overflow = 'unset'
|
|
31
|
+
document.body.style.position = 'relative'
|
|
32
|
+
document.body.style.width = '100%'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
24
36
|
const handleCloseModal = (event: MouseEvent): void => {
|
|
25
37
|
if (onClose != null) onClose()
|
|
26
38
|
}
|
package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCard.styled.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { device } from '../../../globalStyles/breakpoints';
|
|
1
2
|
import styled from 'styled-components';
|
|
2
3
|
export const RatafiaSubscriptionCardStyled = styled.div `
|
|
3
4
|
display: flex;
|
|
@@ -90,5 +91,11 @@ export const RatafiaSubscriptionCardStyled = styled.div `
|
|
|
90
91
|
display: flex;
|
|
91
92
|
margin-top: 1.5rem;
|
|
92
93
|
}
|
|
94
|
+
|
|
95
|
+
@media ${device.mobile} {
|
|
96
|
+
&__button {
|
|
97
|
+
flex: 1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
93
100
|
}
|
|
94
101
|
`;
|
package/dist/src/components/molecules/RatafiaSubscriptionCard/RatafiaSubscriptionCard.styled.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { device } from '../../../globalStyles/breakpoints'
|
|
1
2
|
import styled from 'styled-components'
|
|
2
3
|
|
|
3
4
|
export const RatafiaSubscriptionCardStyled = styled.div`
|
|
@@ -91,5 +92,11 @@ export const RatafiaSubscriptionCardStyled = styled.div`
|
|
|
91
92
|
display: flex;
|
|
92
93
|
margin-top: 1.5rem;
|
|
93
94
|
}
|
|
95
|
+
|
|
96
|
+
@media ${device.mobile} {
|
|
97
|
+
&__button {
|
|
98
|
+
flex: 1;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
94
101
|
}
|
|
95
102
|
`
|