Mark selected page in toolbar

Reviewed By: danielbuechele

Differential Revision: D6976597

fbshipit-source-id: 280623b4dbf18eb008da846077fc8f5277eccc09
This commit is contained in:
Emil Sjölander
2018-02-13 11:27:34 -08:00
committed by Facebook Github Bot
parent 96a87a811d
commit b6a13ce43a
4 changed files with 9 additions and 5 deletions

View File

@@ -17,14 +17,13 @@ require('prismjs/themes/prism.css');
type Props = {|
children: any,
title?: string,
className?: string,
withSpacing?: boolean,
|};
export default (props: Props) => (
<div className={`Page ${props.className || ''}`}>
<Toolbar />
<Toolbar/>
<div className={`PageContent ${props.withSpacing ? 'withSpacing' : ''}`}>
{props.children}
</div>

View File

@@ -15,6 +15,11 @@
background-color: white;
}
.Toolbar .selected {
color: #8FD0C6;
text-decoration: underline;
}
.Toolbar .logo {
display: flex;
align-items: center;

View File

@@ -31,8 +31,8 @@ export default class Toolbar extends Component<Props> {
/>
</Link>
<Link to="/docs">Docs</Link>
<Link to="/playground">Playground</Link>
<Link to="/docs" activeClassName="selected">Documentation</Link>
<Link to="/playground" activeClassName="selected">Playground</Link>
<a href="https://github.com/facebook/yoga">GitHub</a>
{this.props.onShowCode && (

View File

@@ -15,7 +15,7 @@ import Page from '../components/Page';
import Playground from '../components/Playground';
export default () => (
<Page title="Playground">
<Page>
<Playground height="100%" selectedNodePath={[]} persist />
</Page>
);