Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mui-feedback-dialog-connected

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mui-feedback-dialog-connected

A customizeable React feedback form with optional screenshot via screen capture and canvas editor based on material-ui.

  • 2.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
13
Maintainers
1
Weekly downloads
 
Created
Source

mui-feedback-dialog-connected npm version

A React feedback form with optional screenshot via screen capture and canvas editor based on material-ui.

This library wraps the mui-feedback-dialog and handles the encryption and submission to your feedback channel of the recieved feedback. If you already have your own infrastructure and want to handle your feedback yourself, use the un-opinionated mui-feedback-dialog.

API

Installation

You also need to include @material-ui/core, @material-ui/icons, react, and react-dom. IF you have not already done so, you can install them with: npm install --save @material-ui/core @material-ui/icons react react-dom

Then you can install this library with: npm install --save mui-feedback-dialog-connected

Usage
import { FeedbackDialog } from 'mui-feedback-dialog-connected'


const FeedbackButton: React.FunctionComponent<{ mobile?: boolean }> = () => {
    const [dialogVisible, setDialogVisible] = useState(false)

    return <>
        <IconButton onClick={() => setDialogVisible(true)}>
            <FeedbackIcon />
        </IconButton>
        <FeedbackDialog open={dialogVisible} onClose={() => setDialogVisible(false)} tenantId='123' />
    </>
}

FeedbackDialog takes 5 props:

  • open [boolean]: whether the dialog is shown or not
  • onClose [function]: callback to close the dialog
  • onSubmit [function]: callback on submit with the feedback object:
{
    description: 'Some description.',
    email: 'some@email.com',
    screenshot: 'base64-encoded screenshot in webp format'
}
  • noScreenshot [boolean]: whether the option to show a screenshot is shown at all.
  • attachScreenshotOnOpen [boolean]: whether the option to show a screenshot is preselected.
  • useScreencapture [boolean=false]: whether to use screencapture or dom-to-html. Also controls whether the screenshotInfo-info box will be displayed.
  • className [string]: className applied to the dialog component.
  • text [object]: possibility to overwrite the default strings:
    • title
    • cancel
    • submit
    • contentText
    • emailLabel
    • emailError
    • feedbackLabel
    • includeScreenshot
    • tooltipPen
    • tooltipEraser
    • tooltipBlackbox
    • tooltipReset
    • tooltipSubmit
    • screenshotInfo

Screenshot

SampleScreenshot

Demo

CodeSandbox - Demo

FAQs

Package last updated on 07 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc