1.0.0 • Published 4 years ago

react-feedback-dialog v1.0.0

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

react-feedback-dialog

A react user feedback dialog component. Enables screenshots and canvas highlighting.

NPM JavaScript Style Guide

Why

To make collecting feedback more easy.

What

Fast feedback, including screenshot, description and sys specs for your webapp.

Install

npm install --save react-feedback-dialog

or

yarn add react-feedback-dialog

Usage

import React, { Component, useState } from 'react';
import FeedbackDialog from 'react-feedback-dialog';

const publishConfig = {
  method: 'http', // one of 'http' or 'mail'
  httpConfig: {
    // [optional] only required for method: 'http'
    destination: 'http://httpbin.org/post'
  }
};

class Example extends Component {
  const [active, setActive] = useState(false);

  render() {
    return (
      <div>
        <button
          onClick={() => setActive(!active)}
        >Give Feedback</button>

        <Index
          publishConfig={publishConfig}
          active={active}
          onClose={() => setActive(!active)}
        />
      </div>
    );
  }
}

License

MIT © Benedikt Schmeitz