File tree 2 files changed +18
-7
lines changed
packages/fuselage/src/components/Message
2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @rocket.chat/fuselage " : patch
3
+ ---
4
+
5
+ fix(fuselage): ` MessageNameContainer ` missing forwardRef
Original file line number Diff line number Diff line change 1
1
import type { AllHTMLAttributes } from 'react' ;
2
- import React from 'react' ;
2
+ import React , { forwardRef } from 'react' ;
3
3
4
4
type MessageNameContainerProps = AllHTMLAttributes < HTMLSpanElement > ;
5
5
6
- export const MessageNameContainer = ( props : MessageNameContainerProps ) => (
7
- < span
8
- className = 'rcx-box rcx-box--full rcx-message-header__name-container'
9
- { ...props }
10
- />
11
- ) ;
6
+ export const MessageNameContainer = forwardRef <
7
+ HTMLSpanElement ,
8
+ MessageNameContainerProps
9
+ > ( function MessageNameContainer ( props , ref ) {
10
+ return (
11
+ < span
12
+ ref = { ref }
13
+ className = 'rcx-box rcx-box--full rcx-message-header__name-container'
14
+ { ...props }
15
+ />
16
+ ) ;
17
+ } ) ;
You can’t perform that action at this time.
0 commit comments