npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mui-feedback-dialog-connected

v2.0.3

Published

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

Downloads

5

Readme

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: '[email protected]',
    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