site: meta.hidden should work

This commit is contained in:
Benjy Cui 2016-04-05 14:19:58 +08:00
parent 720408e152
commit 202f01c292

View File

@ -33,7 +33,8 @@ export default class ComponentDoc extends React.Component {
const { doc, location } = this.props;
const scrollTo = location.query.scrollTo;
const { description, meta } = doc;
const demos = demosList[meta.fileName] || [];
const demos = (demosList[meta.fileName] || [])
.filter((demoData) => !demoData.meta.hidden);
const expand = this.state.expandAll;
const isSingleCol = meta.cols === 1;