Skip to content

Commit c3f2b0e

Browse files
authored
Merge pull request #23 from Andrew87E/release/0.2.0
Release/0.2.0
2 parents c9ec612 + 0689e67 commit c3f2b0e

20 files changed

+530
-1413
lines changed

.github/workflows/ghDeploy2

Lines changed: 0 additions & 34 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ yarn add react-style-text
3030

3131
## Usage
3232

33-
To use react-style-text in your react project, wrap the content with a `StyledText` component and customize the animation with relevant properties.
33+
To use react-style-text in your react project, wrap the content with a `AnimatedComponent` component and customize the animation with relevant properties.
3434

3535
```jsx
3636
import React from "react";
37-
import { StyledText } from "react-style-text";
37+
import { AnimatedComponent } from "react-style-text";
3838

3939
const MyAnimatedTypo = () => {
4040
return (
41-
<StyledText
41+
<AnimatedComponent
4242
animationProps={{
4343
animationname="animation_type"
4444
duration="1000ms"
@@ -50,7 +50,7 @@ const MyAnimatedTypo = () => {
5050
}}
5151
>
5252
Content...
53-
</StyledText>
53+
</AnimatedComponent>
5454
);
5555
};
5656
```
@@ -106,7 +106,7 @@ A string array of animation names used to wrap the animations you want to chain.
106106

107107
```jsx
108108
import React, { useState } from "react";
109-
import {StyledText} from "react-style-text";
109+
import {AnimatedComponent} from "react-style-text";
110110

111111
const AnimationsForChaining = [
112112
"swing",
@@ -125,7 +125,7 @@ const AnimationChain = () => {
125125
};
126126

127127
return (
128-
<StyledText
128+
<AnimatedComponent
129129
onAnimationEnd={handleChainAnimation}
130130
animationProps={{
131131
type={animationType}
@@ -134,8 +134,8 @@ const AnimationChain = () => {
134134
iteration={1}
135135
}}
136136
>
137-
StyledText
138-
</StyledText>
137+
AnimatedComponent
138+
</AnimatedComponent>
139139
);
140140
};
141141
```

example/dist/index_bundle.js

Lines changed: 0 additions & 905 deletions
This file was deleted.

example/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"react": "18.2.0",
2121
"react-dom": "18.2.0",
2222
"react-router-dom": "6.21.1",
23-
"react-style-text": "^0.1.27",
23+
"react-style-text": "^0.2.1",
2424
"stream-browserify": "^3.0.0",
2525
"styled-components": "6.1.3",
2626
"sweetalert": "^2.1.2",

example/src/components/ExamplePage/examplePage.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useState } from "react";
22
import styled from "styled-components";
3-
import { StyledText } from "react-style-text";
3+
import { AnimatedComponent } from "react-style-text";
44
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
55
import { faPlay, faCode } from "@fortawesome/free-solid-svg-icons";
66
import SelectPanel from "../atoms/selectPanel";
@@ -90,7 +90,7 @@ const ExamplePage = ({}) => {
9090

9191
return `
9292
import React, { useState } from 'react'
93-
import {StyledText} from 'react-style-text'
93+
import {AnimatedComponent} from 'react-style-text'
9494
9595
const AnimationsForChaining = [${itemsText}]
9696
@@ -105,15 +105,15 @@ const AnimationChain = () => {
105105
}
106106
107107
return (
108-
<StyledText
108+
<AnimatedComponent
109109
onAnimationEnd={handleChainAnimation}
110110
type={animationType}
111111
duration="1000ms"
112112
timing="linear"
113113
fillmode="forwards"
114114
iteration={1}>
115115
react-style-text
116-
</StyledText>
116+
</AnimatedComponent>
117117
)
118118
}
119119
`;
@@ -150,7 +150,7 @@ const AnimationChain = () => {
150150
</div>
151151
<ResultContainer className="resultContainer">
152152
<ResultField>
153-
<StyledText
153+
<AnimatedComponent
154154
onAnimationEnd={handleChainAnimation}
155155
type={animationType}
156156
duration="1000ms"
@@ -159,7 +159,7 @@ const AnimationChain = () => {
159159
iteration={1}
160160
>
161161
react-style-text
162-
</StyledText>
162+
</AnimatedComponent>
163163
</ResultField>
164164
<ButtonGroupContainer>
165165
<RoundButton

example/src/components/Footer/footer.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import styled from "styled-components";
3-
import { StyledText } from "react-style-text";
3+
import { AnimatedComponent } from "react-style-text";
44
import ExternalLink from "../atoms/externalLink";
55

66
const Footer = () => {
@@ -10,7 +10,7 @@ const Footer = () => {
1010
return (
1111
<FooterContainer>
1212
Made with
13-
<StyledText
13+
<AnimatedComponent
1414
style={{ margin: "0px 10px", color: "red" }}
1515
animationProps={{
1616
animationname: "spin",
@@ -23,10 +23,10 @@ const Footer = () => {
2323
}}
2424
>
2525
26-
</StyledText>
26+
</AnimatedComponent>
2727
by&nbsp;
2828
{itsaMe.map((letter, index) => (
29-
<StyledText
29+
<AnimatedComponent
3030
key={index}
3131
animationProps={{
3232
animationname: "flipIn",
@@ -45,7 +45,7 @@ const Footer = () => {
4545
>
4646
{letter}
4747
</ExternalLink>
48-
</StyledText>
48+
</AnimatedComponent>
4949
))}
5050
&nbsp; using React and styled-components 💅🏽
5151
</FooterContainer>
@@ -63,7 +63,7 @@ const FooterContainer = styled.div`
6363
font-size: 0.8rem;
6464
color: ${(props) => props.theme.colors.middle};
6565
// background-color: ${(props) => props.theme.colors.secondary};
66-
background: radial-gradient(at left top, #000, #01030D);
66+
background: radial-gradient(at left top, #000, #01030d);
6767
`;
6868

6969
export default Footer;

0 commit comments

Comments
 (0)