Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
hosein2398 committed Jul 2, 2021
0 parents commit 100df1a
Show file tree
Hide file tree
Showing 12 changed files with 9,586 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
extends: [
'react-app',
'standard',
'standard-jsx'
]
}
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Node.js CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
- run: npm ci
- run: npm run build --if-present
- run: npm test
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*.log
.DS_Store
/node_modules
/test/fixtures/node_modules
.rpt2_cache
/lib
/dist
/types
/docs/api
require-trace.trace
.directory
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (C) Hosein Barzegaran

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@


# react-textra

Animate text in react. [demo](https://hosein2398.github.io/react-textra/)
- simple
- no dependency
- multiple effects
## Installing
```
npm i react-textra
```
### Examples:
```js
import Textra from 'react-textra'

function MyComponent() {
return (
<div>
<Textra effect='flash' data={['one', 'two', 'three']} />
</div>
)
}
```

If you want to stop longer:
```html
<Textra effect='flash' stopDuartion={4000} data={['one', 'two', 'three']} />
```


If you want animation to take longer:
```html
<Textra effect='flash' duration={1000} data={['one', 'two', 'three']} />
```
This one will loop around for ever.
## Props

| Prop | Detail | Type | Default
| :------------- |:-------------| :-----:| :-----: |
| data | Array of data to be animated | Array | null
| effect | Animation effect | String | simple
| stopDuration | How long should it stop while showing each item | Number | 3000ms
| duration | animation duration | Number | 500ms

## Effects
There are 8 types of effects available:
| effect |
| :------- |
| rightLeft |
| leftRight |
| topDown |
| downTop |
| flash |
| flip |
| press |
| scale |
8 changes: 8 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
presets: [['@babel/preset-env', {
// Error in Async Example: ReferenceError: regeneratorRuntime is not defined
targets: {
node: '10'
}
}], '@babel/preset-typescript', '@babel/preset-react']
}
Loading

0 comments on commit 100df1a

Please sign in to comment.