Skip to content

Commit

Permalink
chore: add debug color to toc
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Sep 2, 2020
1 parent a204040 commit 7a0320d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions site/theme/static/toc.less
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ ul.toc > li {
margin-right: 0;
padding-right: 0;
}

&.toc-debug a {
color: @purple-6;
}
}

.toc li > ul {
Expand Down
11 changes: 8 additions & 3 deletions site/theme/template/Content/ComponentDoc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,21 @@ class ComponentDoc extends React.Component {
rightChildren.push(demoElem);
}
});
const expandTriggerClass = classNames({
'code-box-expand-trigger': true,
const expandTriggerClass = classNames('code-box-expand-trigger', {
'code-box-expand-trigger-active': expandAll,
});

const jumper = showedDemo.map(demo => {
const { title } = demo.meta;
const localizeTitle = title[locale] || title;
return (
<li key={demo.meta.id} title={localizeTitle}>
<li
key={demo.meta.id}
title={localizeTitle}
className={classNames({
'toc-debug': demo.meta.debug,
})}
>
<a href={`#${demo.meta.id}`}>{localizeTitle}</a>
</li>
);
Expand Down

0 comments on commit 7a0320d

Please sign in to comment.