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 44
55import { useState } from 'react' ;
66import { useRouter } from 'next/router' ;
7+ import cn from 'classnames' ;
78
89export function Feedback ( { onSubmit = ( ) => { } } : { onSubmit ?: ( ) => void } ) {
910 const { asPath} = useRouter ( ) ;
@@ -60,7 +61,11 @@ function sendGAEvent(isPositive: boolean) {
6061function 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 >
Original file line number Diff line number Diff 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+ }
You can’t perform that action at this time.
0 commit comments