Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atriusx/react-support-badge
https://github.com/atriusx/react-support-badge
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/atriusx/react-support-badge
- Owner: AtriusX
- Created: 2021-02-05T19:23:45.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-02-09T00:17:46.000Z (over 3 years ago)
- Last Synced: 2024-10-17T01:36:45.752Z (19 days ago)
- Language: TypeScript
- Size: 602 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-support-badge
> Support Badges for React!
[![NPM](https://img.shields.io/npm/v/react-support-badge.svg)](https://www.npmjs.com/package/react-support-badge) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
## Install
```bash
npm install --save react-support-badge
```## Usage
```tsx
import react, { Component } from 'react'
import { SupportBadge } from 'react-support-badge'function Example() {
return
Please consider supporting me!
}// Or
class Example extends Component {
render() {
return
Please consider supporting me!
}
}
```## Properties
- **icon**
- Sets an icon for the support button. (Uses [react-icons]('https://npmjs.com/react-icons/'))
- **buttonText**
- Sets the support button text.
- **link *(required)***
- Sets the link to redirect to once pressed.
- **look**
- Sets the look of the badge. (Supports solid colors, images, and gradients)
- **flat**
- Disables the box shadow effect on the badge and support buttons when inactive.
- **flatText**
- Disables the text shadow effect on all text on the badge.
- **callback**
- Callback function to run before redirecting to the support badge location.## Other Features
If you would prefer to display a support message in a different way, you can check out `` or ``. More items may get added later on in the future.
## License
MIT © [AtriusX](https://github.com/AtriusX)