Implement streamTabs and streamTabPanes slot

This commit is contained in:
Chi Vinh Le
2017-07-10 20:46:28 +07:00
parent aac47c4686
commit ab72995a2c
15 changed files with 161 additions and 13 deletions
@@ -0,0 +1,8 @@
import React from 'react';
import {TabCount} from 'plugin-api/beta/client/components/ui';
export default ({active, asset: {recentComments}}) => (
<span>
Featured <TabCount active={active} sub>{recentComments.length}</TabCount>
</span>
);
@@ -0,0 +1,14 @@
import React from 'react';
export default ({asset: {recentComments}}) => (
<div>
{recentComments.map((comment) => (
<p key={comment.id}>
<div><strong>{comment.user.username}</strong></div>
<div>
{comment.body}
</div>
</p>
))}
</div>
);