Skip to content

Commit 7d61a26

Browse files
authored
fix(fuselage): MessageNameContainer missing forwardRef (#1291)
1 parent 652eb70 commit 7d61a26

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

.changeset/wise-poems-shop.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rocket.chat/fuselage": patch
3+
---
4+
5+
fix(fuselage): `MessageNameContainer` missing forwardRef
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
import type { AllHTMLAttributes } from 'react';
2-
import React from 'react';
2+
import React, { forwardRef } from 'react';
33

44
type MessageNameContainerProps = AllHTMLAttributes<HTMLSpanElement>;
55

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+
});

0 commit comments

Comments
 (0)