@skillrecordings/feedback-widget
v0.0.3
Published
TODO: Write better readme explaining where the data gets send and how to configure it.
Downloads
5
Readme
TODO: Write better readme explaining where the data gets send and how to configure it.
Usage
- Import and use
FeedbackProvider
// _app.tsx
import {FeedbackProvider} from '@skillrecordings/feedback-widget'
const MyApp = () => {
return (
<FeedbackProvider>
<Component {...pageProps} />
</FeedbackProvider>
)
}
- Add a button to open feedback dialog
// navigation.tsx
import {useFeedback} from '@skillrecordings/feedback-widget'
const FeedbackButton = () => {
const {setIsFeedbackDialogOpen} = useFeedback()
return (
<button
onClick={() => {
setIsFeedbackDialogOpen(true, 'navigation')
}}
>
Send Feedback
</button>
)
}
- Import styles
/* globals.css */
@import '@skillrecordings/feedback-widget/dist/styles.css';