The Feedback component is a widget for collecting user feedback. Users select a rating and enter a comment. The server requires both fields on submission. Results are available in the Mission Control app.
Usage
import { Feedback } from 'components/lib';
function MyComponent({ ...props }) {
return (
<div>
<Feedback />
</div>
);
}
Notes
- The
Feedbackcomponent uses thePopover,PopoverTrigger,PopoverContent,Form,Button,Icon, andViewContextfrom'components/lib'. - The
Feedbackcomponent manages its own state for displaying the rating and comments form. - The
iconsarray defines the icons and colors for the different rating options. - The
saveRatingfunction sets the selected rating and shows the comments form. - The
Formcomponent is used to submit feedback to the backend API.