File tree 1 file changed +10
-3
lines changed
packages/react-reconciler/src
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,14 @@ import {getIsHydrating} from './ReactFiberHydrationContext';
21
21
import { getTreeId } from './ReactFiberTreeContext' ;
22
22
23
23
export type ViewTransitionClassPerType = {
24
- [ transitionType : 'default' | string ] : 'none' | string ,
24
+ [ transitionType : 'default' | string ] : 'none' | 'auto' | string ,
25
25
} ;
26
26
27
- export type ViewTransitionClass = 'none' | string | ViewTransitionClassPerType ;
27
+ export type ViewTransitionClass =
28
+ | 'none'
29
+ | 'auto'
30
+ | string
31
+ | ViewTransitionClassPerType ;
28
32
29
33
export type ViewTransitionProps = {
30
34
name ?: string ,
@@ -127,7 +131,10 @@ export function getViewTransitionClassName(
127
131
const className : ?string = getClassNameByType ( defaultClass ) ;
128
132
const eventClassName : ?string = getClassNameByType ( eventClass ) ;
129
133
if ( eventClassName == null ) {
130
- return className ;
134
+ return className === 'auto' ? null : className ;
135
+ }
136
+ if ( eventClassName === 'auto' ) {
137
+ return null ;
131
138
}
132
139
return eventClassName ;
133
140
}
You can’t perform that action at this time.
0 commit comments