react-kofi-overlay 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/package.json +1 -1
- package/src/Donate.module.scss +1 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[**Jump to usage**](#usage)
|
|
4
4
|
|
|
5
|
-
A React component for accepting donations though Ko-fi without leaving your website:
|
|
5
|
+
A React component for accepting donations though [Ko-fi](https://ko-fi.com/) without leaving your website:
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
@@ -22,7 +22,7 @@ To set up what Ko-fi calls their "[Floating Button Donation Widget](https://ko-f
|
|
|
22
22
|
This has some limitations:
|
|
23
23
|
|
|
24
24
|
- Only a few choices for button CTA (call-to-action text)
|
|
25
|
-
- Limited selection of background
|
|
25
|
+
- Limited selection of background colors
|
|
26
26
|
- Requires you to load a `<script>` tag from their CDN, which creates a global variable, and you then need to call a method on that global to render the donate button. Few potential issues with that:
|
|
27
27
|
- Requires an extra network request on every page load
|
|
28
28
|
- Doesn't work well with modern JS bundling + import/export syntax
|
|
@@ -70,7 +70,7 @@ import { Donate } from 'react-kofi-overlay'
|
|
|
70
70
|
| Prop | Required | Type | Description |
|
|
71
71
|
| ------------- | ------------- | ------------- | ------------- |
|
|
72
72
|
| (children) | required | ReactNode | Contents of the donation button. Can be plain text or any React nodes that are valid children of a `<button>` element. |
|
|
73
|
-
| `username` | required | string | Ko-fi profile to display in the donation panel. Corresponds to the page at `ko-fi.com/<username
|
|
73
|
+
| `username` | required | string | Ko-fi profile to display in the donation panel. Corresponds to the page at `ko-fi.com/<username>`. |
|
|
74
74
|
| `classNames` | optional | object | Class names to apply to different parts of the component for styling. See [Styling](#styling) for more info. |
|
|
75
75
|
| `styles` | optional | object | Inline styles to apply to different parts of the component for styling. See [Styling](#styling) for more info. |
|
|
76
76
|
| `onToggle` | optional | function | Function to call when the donate panel is opened or closed. It receives one argument: a boolean `open` value that indicates if the panel was opened or closed. |
|
|
@@ -102,3 +102,6 @@ For local development of this plugin:
|
|
|
102
102
|
|
|
103
103
|
To build: `npm run build`
|
|
104
104
|
|
|
105
|
+
## Disclaimer
|
|
106
|
+
|
|
107
|
+
This project is not endorsed by or affiliated with Ko-fi Labs, the company behind [Ko-fi](https://ko-fi.com/).
|
package/package.json
CHANGED