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 = {|
|
type Props = {|
|
||||||
children: any,
|
children: any,
|
||||||
title?: string,
|
|
||||||
className?: string,
|
className?: string,
|
||||||
withSpacing?: boolean,
|
withSpacing?: boolean,
|
||||||
|};
|
|};
|
||||||
|
|
||||||
export default (props: Props) => (
|
export default (props: Props) => (
|
||||||
<div className={`Page ${props.className || ''}`}>
|
<div className={`Page ${props.className || ''}`}>
|
||||||
<Toolbar />
|
<Toolbar/>
|
||||||
<div className={`PageContent ${props.withSpacing ? 'withSpacing' : ''}`}>
|
<div className={`PageContent ${props.withSpacing ? 'withSpacing' : ''}`}>
|
||||||
{props.children}
|
{props.children}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -15,6 +15,11 @@
|
|||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.Toolbar .selected {
|
||||||
|
color: #8FD0C6;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
.Toolbar .logo {
|
.Toolbar .logo {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@@ -31,8 +31,8 @@ export default class Toolbar extends Component<Props> {
|
|||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link to="/docs">Docs</Link>
|
<Link to="/docs" activeClassName="selected">Documentation</Link>
|
||||||
<Link to="/playground">Playground</Link>
|
<Link to="/playground" activeClassName="selected">Playground</Link>
|
||||||
<a href="https://github.com/facebook/yoga">GitHub</a>
|
<a href="https://github.com/facebook/yoga">GitHub</a>
|
||||||
|
|
||||||
{this.props.onShowCode && (
|
{this.props.onShowCode && (
|
||||||
|
@@ -15,7 +15,7 @@ import Page from '../components/Page';
|
|||||||
import Playground from '../components/Playground';
|
import Playground from '../components/Playground';
|
||||||
|
|
||||||
export default () => (
|
export default () => (
|
||||||
<Page title="Playground">
|
<Page>
|
||||||
<Playground height="100%" selectedNodePath={[]} persist />
|
<Playground height="100%" selectedNodePath={[]} persist />
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user