Skip to content

Commit a8fc946

Browse files
committed
feat: add 6 transitions
Added 6 transitions, tests and a demo BREAKING CHANGE: removed the demo class
1 parent bd7e669 commit a8fc946

34 files changed

+12488
-215
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["env"]
3+
}

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"vetur.format.defaultFormatter.html": "prettyhtml",
3+
"editor.formatOnSave": true,
4+
"editor.formatOnPaste": true
5+
}

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<!-- [![codebeat badge](https://codebeat.co/badges/ab47d01b-9a17-43e0-b235-ace83771923d)](https://codebeat.co/projects/github-com-lukas-tr-vue-transition-collection-master) -->
1212

13-
Easy to use transitions for your vue projects
13+
Easy to use transitions for your vue project.
1414

1515
## Usage
1616

@@ -19,11 +19,32 @@ npm i vue-transition-collection
1919
```
2020

2121
```javascript
22-
import VueTransitionCollection from 'vue-transition-collection'
22+
import VueTransitionCollection from "vue-transition-collection"
23+
24+
Vue.use(VueTransitionCollection)
25+
```
26+
27+
```html
28+
<vtc-fade mode="out-in" direction="right" duration="1000" delay="0">
29+
<div :key="someKey">some content</div>
30+
</vtc-fade>
2331
```
2432

25-
TODO
33+
## Available transitions
34+
35+
- `vtc-fade`
36+
- `vtc-zoom`
37+
- `vtc-bounce`
38+
- `vtc-flip`
39+
- `vtc-fade-big`
40+
- `vtc-rotate`
41+
- `vtc-slide`
2642

27-
## Features
43+
## Available props
2844

29-
- TODO
45+
- group: `boolean` - Use `<transition-group>` instead of `<transition>`
46+
- mode: `"in-out"|"out-in"` - The transition mode
47+
- direction: `"right"|"left"|"up"|"down"|"toggle"` - The direction of the transition
48+
- inverse: `boolean` - Switch left/right and up/down
49+
- delay: `number` - The delay until the transition starts
50+
- duration: `number` - The duration of the transition

demo/.browserslistrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not ie <= 8

demo/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
15+
.idea
16+
*.suo
17+
*.ntvs*
18+
*.njsproj
19+
*.sln
20+
*.sw*

demo/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# demo
2+
3+
## Project setup
4+
5+
```bash
6+
npm install
7+
```
8+
9+
### Compiles and hot-reloads for development
10+
11+
```bash
12+
npm run serve
13+
```
14+
15+
### Compiles and minifies for production
16+
17+
```bash
18+
npm run build
19+
```
20+
21+
### Lints and fixes files
22+
23+
```bash
24+
npm run lint
25+
```

demo/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ["@vue/app"]
3+
}

0 commit comments

Comments
 (0)