Skip to content

Commit 083c308

Browse files
Fix(Bug) Update Feedback.tsx component visiblity issue (#6533)
* Update Feedback.tsx * Update Feedback.tsx Time reduced to 1.5 seconds, also going to update css * Update index.css CSS updated for feedback component animation. * Update Feedback.tsx * Update index.css --------- Co-authored-by: Ricky <[email protected]>
1 parent bb0ac87 commit 083c308

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/components/Layout/Feedback.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import {useState} from 'react';
66
import {useRouter} from 'next/router';
7+
import cn from 'classnames';
78

89
export function Feedback({onSubmit = () => {}}: {onSubmit?: () => void}) {
910
const {asPath} = useRouter();
@@ -60,7 +61,11 @@ function sendGAEvent(isPositive: boolean) {
6061
function SendFeedback({onSubmit}: {onSubmit: () => void}) {
6162
const [isSubmitted, setIsSubmitted] = useState(false);
6263
return (
63-
<div className="max-w-xs w-80 lg:w-auto py-3 shadow-lg rounded-lg m-4 bg-wash dark:bg-gray-95 px-4 flex">
64+
<div
65+
className={cn(
66+
'max-w-xs w-80 lg:w-auto py-3 shadow-lg rounded-lg m-4 bg-wash dark:bg-gray-95 px-4 flex',
67+
{exit: isSubmitted}
68+
)}>
6469
<p className="w-full font-bold text-primary dark:text-primary-dark text-lg me-4">
6570
{isSubmitted ? 'Thank you for your feedback!' : 'Is this page useful?'}
6671
</p>

src/styles/index.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,3 +719,9 @@ ol.mdx-illustration-block {
719719
width: 100%;
720720
}
721721
}
722+
723+
.exit {
724+
opacity: 0;
725+
transition: opacity 500ms ease-out;
726+
transition-delay: 1s;
727+
}

0 commit comments

Comments
 (0)