File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed
Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -76,13 +76,24 @@ class ComponentTemplate extends React.Component {
7676 < h2 id = { `${ metadata . displayName } -props` } >
7777 < a href = { `#${ metadata . displayName } -props` } > Props</ a >
7878 { metadata . composes && (
79- < small style = { { fontStyle : 'italic' , fontSize : '70%' } } >
80- Accepts all props from{ ' ' }
81- { metadata . composes
82- . map ( p => `<${ p . replace ( './' , '' ) } >` )
83- . join ( ', ' ) } { ' ' }
84- unless otherwise noted.
85- </ small >
79+ < >
80+ { ' ' }
81+ < small style = { { fontStyle : 'italic' , fontSize : '70%' } } >
82+ Accepts all props from{ ' ' }
83+ { metadata . composes
84+ . map ( p => (
85+ < code key = { p } > { `<${ p . replace ( './' , '' ) } >` } </ code >
86+ ) )
87+ . reduce ( ( acc , el , i ) => {
88+ acc . push ( el ) ;
89+ if ( i < metadata . composes . length - 1 ) {
90+ acc . push ( ', ' ) ;
91+ }
92+ return acc ;
93+ } , [ ] ) } { ' ' }
94+ unless otherwise noted.
95+ </ small >
96+ </ >
8697 ) }
8798 </ h2 >
8899 { metadata . props . map ( p => this . renderProp ( p , metadata . displayName ) ) }
You can’t perform that action at this time.
0 commit comments