# @rishabhdaliya/feedback-client

> Here's a README template for your npm package `@rishabhdaliya/feedback-client`:

Latest version **1.1.0** (published 2023-09-08) · 0 weekly downloads

## Install

```sh
npm install @rishabhdaliya/feedback-client
pnpm add @rishabhdaliya/feedback-client
yarn add @rishabhdaliya/feedback-client
bun add @rishabhdaliya/feedback-client
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2023-09-08 |
| First published | 2023-09-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 2 |
| Unpacked size | 21.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | rishabhdaliya |

## Links

- npm: https://www.npmjs.com/package/@rishabhdaliya/feedback-client
- npm.io page: https://npm.io/package/@rishabhdaliya/feedback-client

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^18.2.0
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0

## Recent versions

- 1.1.0 (latest) — 2023-09-08
- 1.0.0 — 2023-09-08
- 0.0.0 — 2023-09-08

## README

Here's a README template for your npm package `@rishabhdaliya/feedback-client`:

```markdown
# @rishabhdaliya/feedback-client

![npm](https://img.shields.io/npm/v/@rishabhdaliya/feedback-client)
![npm](https://img.shields.io/npm/dt/@rishabhdaliya/feedback-client)

`@rishabhdaliya/feedback-client` is a React component for collecting user feedback and ratings through a customizable modal.

## Installation

You can install `@rishabhdaliya/feedback-client` using npm:

```bash
npm install @rishabhdaliya/feedback-client
```

Or, if you prefer using Yarn:

```bash
yarn add @rishabhdaliya/feedback-client
```

## Usage

To integrate the `Feedback` component into your React application, follow these steps:

1. Import the `Feedback` component into your application:

   ```javascript
   import Feedback from '@rishabhdaliya/feedback-client';
   ```

2. Use the `Feedback` component within your JSX:

   ```javascript
   function App() {
     return (
       <div>
         <Feedback />
       </div>
     );
   }
   ```

3. Customize the feedback modal by modifying the `Feedback` component's props.

4. Start your application, and you can now toggle the feedback modal to collect user feedback.

## Props

The `Feedback` component accepts the following props for customization:

- `isOpen` (boolean): Controls whether the feedback modal is open.

- `onClose` (function): A callback function that is triggered when the user closes the modal.

- `handleFeedbackSubmit` (function): A callback function that is triggered when the user submits feedback. It receives the user's rating and text message as arguments.

- Customize the appearance and behavior of the modal as needed by modifying the component's code directly.

## Example

Here's a basic example of how to use the `Feedback` component:

```javascript
import React, { useState } from 'react';
import Feedback from '@rishabhdaliya/feedback-client';

function App() {
  const [isOpen, setIsOpen] = useState(false);

  const handleFeedbackSubmit = (rating, text) => {
    // Handle feedback submission here
    console.log('Rating:', rating);
    console.log('Text:', text);
    setIsOpen(false); // Close the modal
  };

  const handleClose = () => {
    setIsOpen(false);
  };

  const handleOpen = () => {
    setIsOpen(true);
  };

  return (
    <div>
      <button onClick={handleOpen}>Toggle modal</button>
      <Feedback
        isOpen={isOpen}
        onClose={handleClose}
        handleFeedbackSubmit={handleFeedbackSubmit}
      />
    </div>
  );
}

export default App;
```

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Acknowledgments

Thank you for using `@rishabhdaliya/feedback-client`! We appreciate your feedback and contributions.

If you have any questions or encounter issues, please feel free to [open an issue](https://github.com/yourusername/rishabhdaliya/feedback-client/issues).
```

In this template, replace `@rishabhdaliya/feedback-client` with the actual name of your package, and make sure to customize the README with specific usage instructions, props, and any additional information that is relevant to your package. Also, include the correct license information and a link to your package's GitHub repository if applicable.

---
_Source: https://npm.io/package/@rishabhdaliya/feedback-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
