react-feedback-client
v1.0.6
Published
React feedback client package
Downloads
24
Readme
React-Feedback-Client
You can define your component right or left bottom of the page
A modal will be shown after you clicked feedback button
If you will use select, it will be shown conditionally when selected content
Installation
npm i react-feedback-client
Usage
You can describe your headers, labels, placeholders, messages
function App() {
// If you will use select options describe your array by id and name and pass as props to Feedback component,
// If you will not use option select, you do not need to pass below props
// * selectBarArray={selectArray}
// * selectLabel="book"
// * inputLabel="page"
// * inputPlaceholder="pageNumbers"
let selectArray = [
{ id: 1, name: "name 1" },
{ id: 2, name: "name 2" },
{ id: 3, name: "name 3" },
{ id: 4, name: "name 4" }
];
return (
<div className="App">
<Feedback
selectBarArray={selectArray}
feedbackHeader="feedbackHeader"
feedbackLabel="feedback"
websiteFeedbackLabel="website"
contentFeedbackLabel="contentOfBook"
required="required"
typeLabel="type"
feedbackLike="feedbackLike"
feedbackDislike="feedbackDislike"
feedbackSuggestion="feedbackSuggestion"
feedbackError="feedbackError"
selectLabel="book"
inputLabel="page"
inputPlaceholder="pageNumbers"
textareaLabel="writeFeedback"
textareaPlaceholder="feedbackComment"
minChar="minimumCharacter"
submitButtonText="submit"
position={"right"}
buttonText="feedback"
isDark={false}
successMessage="feedbackMessage"
errorMessage="msg_1"
serviceUrl="url"
header={{
"Content-Type": "application/json",
Accept: "application/json",
Authorization: "Bearer " + "token"
}}
/>
</div>
);
}
export default App;