File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
packages/coreui-react/src/components/toast Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ export const CToast = forwardRef<HTMLDivElement, CToastProps>(
118118 < Transition
119119 in = { _visible }
120120 nodeRef = { toastRef }
121- onEnter = { ( ) => onShow && onShow ( index ? index : null ) }
122- onExited = { ( ) => onClose && onClose ( index ? index : null ) }
121+ onEnter = { ( ) => onShow && onShow ( index ?? null ) }
122+ onExited = { ( ) => onClose && onClose ( index ?? null ) }
123123 timeout = { 250 }
124124 unmountOnExit
125125 >
@@ -132,14 +132,9 @@ export const CToast = forwardRef<HTMLDivElement, CToastProps>(
132132 fade : animation ,
133133 [ `bg-${ color } ` ] : color ,
134134 'border-0' : color ,
135+ 'show showing' : state === 'entering' || state === 'exiting' ,
136+ show : state === 'entered' ,
135137 } ,
136- state === 'entering'
137- ? 'show showing'
138- : state === 'entered'
139- ? 'show'
140- : state === 'exiting'
141- ? 'show showing'
142- : '' ,
143138 className ,
144139 ) }
145140 aria-live = "assertive"
You can’t perform that action at this time.
0 commit comments