File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 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';
2121import { getTreeId } from './ReactFiberTreeContext' ;
2222
2323export type ViewTransitionClassPerType = {
24- [ transitionType : 'default' | string ] : 'none' | string ,
24+ [ transitionType : 'default' | string ] : 'none' | 'auto' | string ,
2525} ;
2626
27- export type ViewTransitionClass = 'none' | string | ViewTransitionClassPerType ;
27+ export type ViewTransitionClass =
28+ | 'none'
29+ | 'auto'
30+ | string
31+ | ViewTransitionClassPerType ;
2832
2933export type ViewTransitionProps = {
3034 name ?: string ,
@@ -127,7 +131,10 @@ export function getViewTransitionClassName(
127131 const className : ?string = getClassNameByType ( defaultClass ) ;
128132 const eventClassName : ?string = getClassNameByType ( eventClass ) ;
129133 if ( eventClassName == null ) {
130- return className ;
134+ return className === 'auto' ? null : className ;
135+ }
136+ if ( eventClassName === 'auto' ) {
137+ return null ;
131138 }
132139 return eventClassName ;
133140}
You can’t perform that action at this time.
0 commit comments