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>(
118
118
< Transition
119
119
in = { _visible }
120
120
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 ) }
123
123
timeout = { 250 }
124
124
unmountOnExit
125
125
>
@@ -132,14 +132,9 @@ export const CToast = forwardRef<HTMLDivElement, CToastProps>(
132
132
fade : animation ,
133
133
[ `bg-${ color } ` ] : color ,
134
134
'border-0' : color ,
135
+ 'show showing' : state === 'entering' || state === 'exiting' ,
136
+ show : state === 'entered' ,
135
137
} ,
136
- state === 'entering'
137
- ? 'show showing'
138
- : state === 'entered'
139
- ? 'show'
140
- : state === 'exiting'
141
- ? 'show showing'
142
- : '' ,
143
138
className ,
144
139
) }
145
140
aria-live = "assertive"
You can’t perform that action at this time.
0 commit comments