feedback UI

This commit is contained in:
ajaythapliyal 2023-03-05 22:50:24 +05:30
parent 37ae24b879
commit d4d663de38

View File

@ -1,4 +1,3 @@
import React from 'react';
import { forwardRef, useState } from 'react'; import { forwardRef, useState } from 'react';
import Avatar from '../Avatar'; import Avatar from '../Avatar';
import { MESSAGE_TYPE } from './conversationModels'; import { MESSAGE_TYPE } from './conversationModels';
@ -15,7 +14,6 @@ const ConversationBubble = forwardRef<
} }
>(function ConversationBubble({ message, type, className }, ref) { >(function ConversationBubble({ message, type, className }, ref) {
const [showFeedback, setShowFeedback] = useState(false); const [showFeedback, setShowFeedback] = useState(false);
let bubble; let bubble;
if (type === 'QUESTION') { if (type === 'QUESTION') {
bubble = ( bubble = (
@ -49,14 +47,14 @@ const ConversationBubble = forwardRef<
</div> </div>
<div <div
className={`mr-2 flex items-center justify-center ${ className={`mr-2 flex items-center justify-center ${
showFeedback ? '' : 'invisible' type !== 'ERROR' && showFeedback ? '' : 'invisible'
}`} }`}
> >
<Like fill="none" className="hover:fill-gray-4000"></Like> <Like fill="none" className="hover:fill-gray-4000"></Like>
</div> </div>
<div <div
className={`mr-10 flex items-center justify-center ${ className={`mr-10 flex items-center justify-center ${
showFeedback ? '' : 'invisible' type !== 'ERROR' && showFeedback ? '' : 'invisible'
}`} }`}
> >
<Dislike fill="none" className="hover:fill-gray-4000"></Dislike> <Dislike fill="none" className="hover:fill-gray-4000"></Dislike>