@@ -11,11 +11,8 @@ function displayObj(obj) {
1111 return JSON . stringify ( obj , null , 2 ) . replace ( / " | ' / g, '' ) ;
1212}
1313
14- let cleanDocletValue = str =>
15- str
16- . trim ( )
17- . replace ( / ^ \{ / , '' )
18- . replace ( / \} $ / , '' ) ;
14+ let cleanDocletValue = ( str ) =>
15+ str . trim ( ) . replace ( / ^ \{ / , '' ) . replace ( / \} $ / , '' ) ;
1916
2017const extractMarkdown = ( { description } ) =>
2118 description &&
@@ -51,7 +48,7 @@ class ComponentTemplate extends React.Component {
5148 const { metadata } = data ;
5249 const { componentPages } = data . site . siteMetadata ;
5350 const { codeSandboxId } = componentPages . find (
54- page => page . displayName === metadata . displayName
51+ ( page ) => page . displayName === metadata . displayName
5552 ) ;
5653 return (
5754 < Layout data = { data } location = { location } >
@@ -79,7 +76,7 @@ class ComponentTemplate extends React.Component {
7976 < small style = { { fontStyle : 'italic' , fontSize : '70%' } } >
8077 Accepts all props from{ ' ' }
8178 { metadata . composes
82- . map ( p => (
79+ . map ( ( p ) => (
8380 < code key = { p } > { `<${ p . replace ( './' , '' ) } >` } </ code >
8481 ) )
8582 . reduce ( ( acc , el , i ) => {
@@ -94,7 +91,9 @@ class ComponentTemplate extends React.Component {
9491 </ >
9592 ) }
9693 </ h2 >
97- { metadata . props . map ( p => this . renderProp ( p , metadata . displayName ) ) }
94+ { metadata . props . map ( ( p ) =>
95+ this . renderProp ( p , metadata . displayName )
96+ ) }
9897 </ Container >
9998 </ div >
10099 </ Layout >
0 commit comments