File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 4
4
5
5
import { useState } from 'react' ;
6
6
import { useRouter } from 'next/router' ;
7
+ import cn from 'classnames' ;
7
8
8
9
export function Feedback ( { onSubmit = ( ) => { } } : { onSubmit ?: ( ) => void } ) {
9
10
const { asPath} = useRouter ( ) ;
@@ -60,7 +61,11 @@ function sendGAEvent(isPositive: boolean) {
60
61
function SendFeedback ( { onSubmit} : { onSubmit : ( ) => void } ) {
61
62
const [ isSubmitted , setIsSubmitted ] = useState ( false ) ;
62
63
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
+ ) } >
64
69
< p className = "w-full font-bold text-primary dark:text-primary-dark text-lg me-4" >
65
70
{ isSubmitted ? 'Thank you for your feedback!' : 'Is this page useful?' }
66
71
</ p >
Original file line number Diff line number Diff line change @@ -719,3 +719,9 @@ ol.mdx-illustration-block {
719
719
width : 100% ;
720
720
}
721
721
}
722
+
723
+ .exit {
724
+ opacity : 0 ;
725
+ transition : opacity 500ms ease-out;
726
+ transition-delay : 1s ;
727
+ }
You can’t perform that action at this time.
0 commit comments