-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
# react-animated-heart | ||
# react-animated-heart | ||
|
||
[!["Monthly Download"](https://img.shields.io/npm/dm/react-animated-heart.svg)](https://npmjs.org/package/react-animated-heart) | ||
[!["Latest Release"](https://img.shields.io/npm/v/react-animated-heart.svg)](https://github.com/ShaunLWM/react-animated-heart/releases/latest) | ||
[![MIT license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/ShaunLWM/react-animated-heart/blob/master/LICENSE) | ||
|
||
A simple Twitter-like animated button. <small>desperately needed it for one of my projects.</small> | ||
|
||
![script preview](img/ss.gif) | ||
## Installation | ||
```npm install react-animated-heart``` | ||
|
||
```yarn add react-animated-heart``` | ||
|
||
## Usage | ||
```javascript | ||
import React, { useState } from "react"; | ||
import Heart from "react-animated-heart"; | ||
|
||
export default function App() { | ||
const [isClick, setClick] = useState(false); | ||
return ( | ||
<div className="App"> | ||
<Heart isClick={isClick} onClick={() => setClick(!isClick)} /> | ||
</div> | ||
); | ||
} | ||
``` | ||
|
||
## License | ||
MIT |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "react-animated-heart", | ||
"version": "0.0.1", | ||
"description": "Simple Twitter-like animated heart", | ||
"main": "index.js", | ||
"repository": "[email protected]:ShaunLWM/react-animated-heart.git", | ||
"author": "ShaunLWM", | ||
"license": "MIT", | ||
"keywords": [ | ||
"twitter-heart", | ||
"twitter-animated-heart", | ||
"like button", | ||
"heart button", | ||
"heart", | ||
"exploding button" | ||
], | ||
"dependencies": { | ||
"react": "16.12.0", | ||
"styled-components": "4.4.1" | ||
} | ||
} |