npm package: @serhatyilmaz/feedbacky
Description: Feedbacky allows you to add a simple feedback widget to your website. Feedbacky adds a button to the bottom of your website, and when the button is clicked, it opens a modal containing a form for users to send feedback.
Author: Serhat Yilmaz
Latest version: 1.0.4

# Feedbacky

Feedbacky allows you to add a simple feedback widget to your website. Feedbacky adds a button to the bottom of your website, and when the button is clicked, it opens a modal containing a form for users to send feedback.

It is lightweight, (40.4kb) simple, and easy to integrate.

Feedbacky built with [lit.dev](https://lit.dev/).

You can check out the [demo page](https://serhatyilmaz.vercel.app/feedbacky) to see how the package works.

## Installation

Use the package manager [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) to install feedbacky.

```bash
npm install @serhatyilmaz/feedbacky
```

## Props

| Property          | Type              | Description                                                                                                                     | Default Value             |
| ----------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| apiKey            | string - required | Predefined unique key of the customer                                                                                           | ''                        |
| spreadSheetId     | string - required | ID of the spreadsheet where the data is expected to be written (Ex. https://docs.google.com/spreadsheets/d/**{spreadSheetId}**) | ''                        |
| sheetName         | string - required | Page name of the where the data is expected to be written                                                                       | ''                        |
| modalTitle        | string            | Title text displayed top of the form                                                                                            | Send Your Feedback        |
| submitButtonText  | string            | Text of the submit button in the form                                                                                           | Submit                    |
| loadingText       | string            | Button's text when http request was pending                                                                                     | Loading...                |
| submitSuccessText | string            | Success message Success message displayed after form submission                                                                 | We Have Got Your Feedback |

## Usage

```javascript
import feedbacky-widget

// You can use the element
<feedbacky-widget
spreadSheetId="Your spreadSheetId"
sheetName="Your sheetName"
apiKey="Your apiKey"
></feedbacky-widget>
```

## Development

Feedbacky is developed using lit.dev and TypeScript. You can build and start development by following these steps

```javascript
npm run build:watch
npm run serve
```

## Testing

Feedbacky using web-test-runner you can test with the following code

```javascript
npm run test
npm run test:watch
```

## Code Coverage

| File               | Statements | Functions | Lines   |
| ------------------ | ---------- | --------- | ------- |
| feedback-widget.ts | 98.37%     | 100%      | 302/307 |

## License

This project is licensed under the [MIT](https://opensource.org/license/MIT) License. For more information, see the [LICENSE](https://opensource.org/license/MIT) file.