diff --git a/package.json b/package.json index f1bcc64..2c7bd58 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@navigationjs/react", - "version": "0.3.2", + "version": "0.3.3", "description": "Small and well-tested React navigation", "main": "dist/index.js", "author": "Ivan Zotov (http://ivanzotov.com/)", diff --git a/src/Modal/Scene.js b/src/Modal/Scene.js index e2ecb4f..bc67ea8 100644 --- a/src/Modal/Scene.js +++ b/src/Modal/Scene.js @@ -3,7 +3,7 @@ import { Value } from '@navigationjs/core'; export default class Scene { constructor(name) { this.name = name; - this.active = new Value('active'); + this.active = new Value('active', 0, 300); } show = duration => this.active.to(1, duration); diff --git a/src/Modal/Wrap.js b/src/Modal/Wrap.js index 64769b8..5d34a17 100644 --- a/src/Modal/Wrap.js +++ b/src/Modal/Wrap.js @@ -57,7 +57,7 @@ export default class Wrap extends Component { right: 0, bottom: 0, transitionProperty: 'transform', - transitionDuration: '300ms', + transitionDuration: `${scene.active.duration}ms`, overflowY: 'auto', backgroundColor: 'white', }} diff --git a/src/Stack/Scene.js b/src/Stack/Scene.js index 070095c..e9963c5 100644 --- a/src/Stack/Scene.js +++ b/src/Stack/Scene.js @@ -3,7 +3,7 @@ import { Value } from '@navigationjs/core'; export default class Scene { constructor(name) { this.name = name; - this.active = new Value('active'); + this.active = new Value('active', 0, 300); this.depth = new Value('depth'); } show = duration => diff --git a/src/Stack/Wrap.js b/src/Stack/Wrap.js index 56c978c..4b2a12c 100644 --- a/src/Stack/Wrap.js +++ b/src/Stack/Wrap.js @@ -60,7 +60,7 @@ export default class Wrap extends Component { right: 0, bottom: 0, transitionProperty: 'transform', - transitionDuration: '300ms', + transitionDuration: `${scene.active.duration}ms`, overflowY: 'auto', backgroundColor: 'white', }} diff --git a/src/Tab/Wrap.js b/src/Tab/Wrap.js index 64769b8..5d34a17 100644 --- a/src/Tab/Wrap.js +++ b/src/Tab/Wrap.js @@ -57,7 +57,7 @@ export default class Wrap extends Component { right: 0, bottom: 0, transitionProperty: 'transform', - transitionDuration: '300ms', + transitionDuration: `${scene.active.duration}ms`, overflowY: 'auto', backgroundColor: 'white', }}