Tweak styling of single component view in DevDocs.

This commit is contained in:
Jeff Stieler 2019-08-29 07:47:27 -07:00
parent 3d03faa887
commit 134f472484
1 changed files with 34 additions and 32 deletions

View File

@ -3,7 +3,7 @@
* External dependencies
*/
import classnames from 'classnames';
import { Component } from '@wordpress/element';
import { Component, Fragment } from '@wordpress/element';
import { find, get } from 'lodash';
/**
@ -55,8 +55,9 @@ export default class extends Component {
'woocommerce-analytics__card'
);
return (
<Fragment key={ componentName }>
<Card
key={ componentName }
key={ `${ componentName }-example` }
className={ cardClasses }
title={
component ? (
@ -84,15 +85,16 @@ export default class extends Component {
filePath={ filePath }
render={ render }
/>
</Card>
{ component && (
<ComponentDocs
key={ `${ componentName }-readme` }
componentName={ componentName }
filePath={ filePath }
docPath={ docPath }
/>
) }
</Card>
</Fragment>
);
} ) }
</div>