Mark selected page in toolbar
Reviewed By: danielbuechele Differential Revision: D6976597 fbshipit-source-id: 280623b4dbf18eb008da846077fc8f5277eccc09
This commit is contained in:
committed by
Facebook Github Bot
parent
96a87a811d
commit
b6a13ce43a
@@ -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>
|
||||
|
@@ -15,6 +15,11 @@
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.Toolbar .selected {
|
||||
color: #8FD0C6;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.Toolbar .logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@@ -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 && (
|
||||
|
@@ -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>
|
||||
);
|
||||
|
Reference in New Issue
Block a user