animation-text-icon 1.0.0
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 +0 -0
- package/index.js +56 -0
- package/package.json +25 -0
package/README.md
ADDED
|
Binary file
|
package/index.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
function AnimationPackage(props) {
|
|
2
|
+
const {
|
|
3
|
+
text='Animate',
|
|
4
|
+
icon,
|
|
5
|
+
direction='forwards',
|
|
6
|
+
initialAnimationValue={
|
|
7
|
+
color:'black',
|
|
8
|
+
rotate:'180deg',
|
|
9
|
+
scale:'100%',
|
|
10
|
+
Xposition:'200px',
|
|
11
|
+
Yposition:'200px'
|
|
12
|
+
},
|
|
13
|
+
finalAnimationValue={
|
|
14
|
+
color:'black',
|
|
15
|
+
rotate:'0deg',
|
|
16
|
+
scale:'100%',
|
|
17
|
+
Xposition:'0px',
|
|
18
|
+
Yposition:'0px'
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
}=props
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<>
|
|
27
|
+
<style>
|
|
28
|
+
{`
|
|
29
|
+
#myDiv1 {
|
|
30
|
+
animation: slideIn 2s ease-out ${direction};
|
|
31
|
+
color:green
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@keyframes slideIn {
|
|
35
|
+
from {
|
|
36
|
+
transform: translate(${initialAnimationValue.Xposition}, ${initialAnimationValue.Yposition}) rotate(${initialAnimationValue.rotate}) scale(${initialAnimationValue.scale});
|
|
37
|
+
}
|
|
38
|
+
to {
|
|
39
|
+
transform: translate(${finalAnimationValue.Xposition}, ${finalAnimationValue.Yposition}) rotate(${finalAnimationValue.rotate}) scale(${finalAnimationValue.scale});;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`}
|
|
43
|
+
</style>
|
|
44
|
+
{!icon &&
|
|
45
|
+
<div id="myDiv1">
|
|
46
|
+
{text}
|
|
47
|
+
</div>}
|
|
48
|
+
{icon &&
|
|
49
|
+
<div id="myDiv1">
|
|
50
|
+
{icon}
|
|
51
|
+
</div>}
|
|
52
|
+
</>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
module.exports=AnimationPackage
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "animation-text-icon",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "package for animate text and icon",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"animation",
|
|
7
|
+
"textAnimation",
|
|
8
|
+
"iconAnimation"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/SekarMurugesan/animationPackage#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/SekarMurugesan/animationPackage/issues"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/SekarMurugesan/animationPackage.git"
|
|
17
|
+
},
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"author": "Sekar",
|
|
20
|
+
"type": "commonjs",
|
|
21
|
+
"main": "index.js",
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
24
|
+
}
|
|
25
|
+
}
|