File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @livekit/components-react " : patch
3
+ ---
4
+
5
+ fix: merge classes for slotted cloned children
Original file line number Diff line number Diff line change @@ -28,10 +28,10 @@ export function cloneSingleChild(
28
28
// Checking isValidElement is the safe way and avoids a typescript
29
29
// error too.
30
30
if ( React . isValidElement ( child ) && React . Children . only ( children ) ) {
31
- if ( child . props . class ) {
31
+ if ( child . props . className ) {
32
32
// make sure we retain classnames of both passed props and child
33
33
props ??= { } ;
34
- props . class = clsx ( child . props . class , props . class ) ;
34
+ props . className = clsx ( child . props . className , props . className ) ;
35
35
props . style = { ...child . props . style , ...props . style } ;
36
36
}
37
37
return React . cloneElement ( child , { ...props , key } ) ;
You can’t perform that action at this time.
0 commit comments