Feedback
FeedbackForm
Ready-made component, using which you may assemble the form for feedback filling. Assembled using our components, and the react-final-form is responsible for the form validation. The component Form of the library react-final-form, inside which there is the SpinContainer, takes all the properties.
jsx
import FeedbackForm from '@semcore/ui/feedback-form';
<FeedbackForm />;FeedbackFormProps
& {...}| Name | Type | Description |
|---|---|---|
| onSubmit | (values: any, form: any, callback: (errors: {}) => void) => {} | Promise<{}> | void | The event is called when the form is submitted |
| loading | boolean | The property is in charge of the spinner showing |
| background | string | Color of container spinner; you can use your own color |
| theme | "dark" | "invert" | string | Spinner theme. There are several default themes or you can use your own color |
FeedbackForm.Item
The pre-configured Field component from the react-final-form library. Inside it there is the Tooltip, and you may set the trigger using the property tag or render function.
jsx
import FeedbackForm from '@semcore/ui/feedback-form';
<FeedbackForm.Item />;FeedbackForm.Success
The pre-configured Box component.
jsx
import FeedbackForm from '@semcore/ui/feedback-form';
<FeedbackForm.Success />;FeedbackForm.Submit, FeedbackForm.Cancel
The pre-configured Button component.
jsx
import FeedbackForm from '@semcore/ui/feedback-form';
<FeedbackForm.Submit />;
<FeedbackForm.Cancel />;FeedbackForm.Notice
The pre-configured Notice component.
jsx
import FeedbackForm from '@semcore/ui/feedback-form';
<FeedbackForm.Notice />;FeedbackForm.FeedbackRating
The pre-configured FeedbackForm component for FeedbackRating.
jsx
import FeedbackRating from '@semcore/ui/feedback-form';
<FeedbackForm.FeedbackRatingProps />;FeedbackRatingProps
& {...}| Name | Type | Description |
|---|---|---|
| status | "default" | "success" | "error" | "loading" | Status of form |
| notificationVisible | boolean | Flag for show/hide notification |
| onNotificationClose | () => void | Notification close callback |
| notificationText | string | Text in notification panel |
| notificationTitle | string | Title in notification panel |
| learnMoreLink | string | Optional link in notification panel |
| rating | number | Rating value |
| visible | boolean | Visible modal form flag |
| onVisibleChange | (visible: boolean, rating: number) => void | Visibility changes callback |
| modalWidth | number | string | Width for modal with form |
| header | React.ReactNode | Header of modal with form |
| submitText | string | Text for submit button of form |
| formConfig | [] | Config for form fields |
| initialValues | Record<string, any> & {rating: number } | Initial form values including rating |
| errorFeedbackEmail | string | Email address shown in error messages |
| locale | string | Specifies the locale for i18n support |