Skip to content

Commit e7914d7

Browse files
authored
Merge pull request #2337 from lindapaiste/fix/cookie-position
Fix #2336: `CookieConsent` cannot be hidden properly on very small screens
2 parents d956b05 + aa98116 commit e7914d7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

client/modules/User/components/CookieConsent.jsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import ReactGA from 'react-ga';
66
import { Transition } from 'react-transition-group';
77
import { Link } from 'react-router-dom';
88
import { Trans, useTranslation } from 'react-i18next';
9-
import { PropTypes } from 'prop-types';
9+
import PropTypes from 'prop-types';
1010
import getConfig from '../../../utils/getConfig';
1111
import { setUserCookieConsent } from '../actions';
1212
import { remSize, prop, device } from '../../../theme';
@@ -15,11 +15,12 @@ import Button from '../../../common/Button';
1515
const CookieConsentContainer = styled.div`
1616
position: fixed;
1717
transition: 1.6s cubic-bezier(0.165, 0.84, 0.44, 1);
18-
bottom: ${({ state }) => {
18+
bottom: 0;
19+
transform: ${({ state }) => {
1920
if (state === 'entered') {
20-
return '0';
21+
return 'translateY(0)';
2122
}
22-
return remSize(-300);
23+
return 'translateY(105%)';
2324
}};
2425
left: 0;
2526
right: 0;

0 commit comments

Comments
 (0)