Skip to content

Commit

Permalink
Merge pull request processing#2337 from lindapaiste/fix/cookie-position
Browse files Browse the repository at this point in the history
Fix processing#2336: `CookieConsent` cannot be hidden properly on very small screens
  • Loading branch information
raclim authored Jan 11, 2024
2 parents d956b05 + aa98116 commit e7914d7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client/modules/User/components/CookieConsent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ReactGA from 'react-ga';
import { Transition } from 'react-transition-group';
import { Link } from 'react-router-dom';
import { Trans, useTranslation } from 'react-i18next';
import { PropTypes } from 'prop-types';
import PropTypes from 'prop-types';
import getConfig from '../../../utils/getConfig';
import { setUserCookieConsent } from '../actions';
import { remSize, prop, device } from '../../../theme';
Expand All @@ -15,11 +15,12 @@ import Button from '../../../common/Button';
const CookieConsentContainer = styled.div`
position: fixed;
transition: 1.6s cubic-bezier(0.165, 0.84, 0.44, 1);
bottom: ${({ state }) => {
bottom: 0;
transform: ${({ state }) => {
if (state === 'entered') {
return '0';
return 'translateY(0)';
}
return remSize(-300);
return 'translateY(105%)';
}};
left: 0;
right: 0;
Expand Down

0 comments on commit e7914d7

Please sign in to comment.