Skip to content

Commit 4d304ce

Browse files
committed
feat(factory): add in option of staticStyles as prop
1 parent c488ae1 commit 4d304ce

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/factory/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const transitionFactory = (
7878
): Object => {
7979
return {
8080
transition: this.getTransitionProperty(timeout, easing),
81-
...staticStyles,
81+
...(this.props.staticStyles || staticStyles),
8282
...transitionConfigs.reduce((style, config, index) => {
8383
const startVal = getPrimitiveValue(start, index);
8484
const transitionName = camelCase(config.transition);

src/types/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export type TransitionConfig = {
2020

2121
export type TransitionProps = {
2222
children: Function | Node,
23+
staticStyles?: Object,
2324
start?: ArrayOrValue,
2425
end?: ArrayOrValue,
2526
timeout: ArrayOrNumber,

0 commit comments

Comments
 (0)