diff --git a/app/scripts/components/common/cookie-consent/index.scss b/app/scripts/components/common/cookie-consent/index.scss index 71526634f..4d84aa077 100644 --- a/app/scripts/components/common/cookie-consent/index.scss +++ b/app/scripts/components/common/cookie-consent/index.scss @@ -1,19 +1,3 @@ -#cookie-consent{ - - @media screen and (min-width: 768px) { - bottom: 0; - right: 0; - } -} - -.hide-modal { - transition: bottom 1.125s ease-in-out 0.125s, opacity 1s ease-in-out 0.125s; -} - -.close { - & svg { - @media screen and (min-width: 768px) { - right: -50px; - } - } +.animation--fade-out { + transition: opacity 0.5s ease-in-out 0.125s; } diff --git a/app/scripts/components/common/cookie-consent/index.tsx b/app/scripts/components/common/cookie-consent/index.tsx index 23c73e11e..de85ef370 100644 --- a/app/scripts/components/common/cookie-consent/index.tsx +++ b/app/scripts/components/common/cookie-consent/index.tsx @@ -1,5 +1,4 @@ import React, { useState, useEffect } from 'react'; - import { Icon } from '@trussworks/react-uswds'; import { USWDSAlert, @@ -38,7 +37,9 @@ export const CookieConsent = ({ )}; path=/; expires=${closeConsent ? '0' : setCookieExpiration()}`; }; - const addAttribute = copy && copy?.replaceAll(' { const cookieValue = { responded: cookieConsentResponded, @@ -46,33 +47,36 @@ export const CookieConsent = ({ }; setCookie(cookieValue, closeConsent); onFormInteraction(); - }, [cookieConsentResponded, cookieConsentAnswer]); + }, [cookieConsentResponded, cookieConsentAnswer, closeConsent]); + return (