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(
2828 // Checking isValidElement is the safe way and avoids a typescript
2929 // error too.
3030 if ( React . isValidElement ( child ) && React . Children . only ( children ) ) {
31- if ( child . props . class ) {
31+ if ( child . props . className ) {
3232 // make sure we retain classnames of both passed props and child
3333 props ??= { } ;
34- props . class = clsx ( child . props . class , props . class ) ;
34+ props . className = clsx ( child . props . className , props . className ) ;
3535 props . style = { ...child . props . style , ...props . style } ;
3636 }
3737 return React . cloneElement ( child , { ...props , key } ) ;
You can’t perform that action at this time.
0 commit comments