@@ -14,7 +14,7 @@ import FeedExtra from './FeedExtra'
14
14
import FeedMeta from './FeedMeta'
15
15
import FeedSummary from './FeedSummary'
16
16
17
- function FeedContent ( props ) {
17
+ const FeedContent = React . forwardRef ( function ( props , ref ) {
18
18
const { children, className, content, extraImages, extraText, date, meta, summary } = props
19
19
20
20
const classes = cx ( 'content' , className )
@@ -23,14 +23,14 @@ function FeedContent(props) {
23
23
24
24
if ( ! childrenUtils . isNil ( children ) ) {
25
25
return (
26
- < ElementType { ...rest } className = { classes } >
26
+ < ElementType { ...rest } className = { classes } ref = { ref } >
27
27
{ children }
28
28
</ ElementType >
29
29
)
30
30
}
31
31
32
32
return (
33
- < ElementType { ...rest } className = { classes } >
33
+ < ElementType { ...rest } className = { classes } ref = { ref } >
34
34
{ createShorthand ( FeedDate , ( val ) => ( { content : val } ) , date , { autoGenerateKey : false } ) }
35
35
{ createShorthand ( FeedSummary , ( val ) => ( { content : val } ) , summary , {
36
36
autoGenerateKey : false ,
@@ -45,8 +45,9 @@ function FeedContent(props) {
45
45
{ createShorthand ( FeedMeta , ( val ) => ( { content : val } ) , meta , { autoGenerateKey : false } ) }
46
46
</ ElementType >
47
47
)
48
- }
48
+ } )
49
49
50
+ FeedContent . displayName = 'FeedContent'
50
51
FeedContent . propTypes = {
51
52
/** An element type to render as (string or function). */
52
53
as : PropTypes . elementType ,
0 commit comments