mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
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 <rickhanlonii@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
import {useState} from 'react';
|
||||
import {useRouter} from 'next/router';
|
||||
import cn from 'classnames';
|
||||
|
||||
export function Feedback({onSubmit = () => {}}: {onSubmit?: () => void}) {
|
||||
const {asPath} = useRouter();
|
||||
@@ -60,7 +61,11 @@ function sendGAEvent(isPositive: boolean) {
|
||||
function SendFeedback({onSubmit}: {onSubmit: () => void}) {
|
||||
const [isSubmitted, setIsSubmitted] = useState(false);
|
||||
return (
|
||||
<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">
|
||||
<div
|
||||
className={cn(
|
||||
'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',
|
||||
{exit: isSubmitted}
|
||||
)}>
|
||||
<p className="w-full font-bold text-primary dark:text-primary-dark text-lg me-4">
|
||||
{isSubmitted ? 'Thank you for your feedback!' : 'Is this page useful?'}
|
||||
</p>
|
||||
|
||||
@@ -719,3 +719,9 @@ ol.mdx-illustration-block {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.exit {
|
||||
opacity: 0;
|
||||
transition: opacity 500ms ease-out;
|
||||
transition-delay: 1s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user