playground doc page first draft
Reviewed By: danielbuechele Differential Revision: D6968725 fbshipit-source-id: 588018a347a723b32e4dcab407c4da2db0d85130
This commit is contained in:
committed by
Facebook Github Bot
parent
7e3136c347
commit
9eb03b1bcd
@@ -1,6 +1,9 @@
|
|||||||
.doc-block .markdown {
|
.no-playground .markdown {
|
||||||
padding-top: 50px;
|
padding-top: 50px;
|
||||||
padding-bottom: 50px;
|
}
|
||||||
|
|
||||||
|
.doc-block .markdown {
|
||||||
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.doc-block .overview {
|
.doc-block .overview {
|
||||||
@@ -35,3 +38,7 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.doc-block .prop {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
@@ -17,32 +17,19 @@ import DocsSidebar from '../components/DocsSidebar';
|
|||||||
import EditValue from '../components/Playground/EditValue';
|
import EditValue from '../components/Playground/EditValue';
|
||||||
import Link from 'gatsby-link';
|
import Link from 'gatsby-link';
|
||||||
import {Button, Icon, Row, Col} from 'antd';
|
import {Button, Icon, Row, Col} from 'antd';
|
||||||
|
import './index.css';
|
||||||
|
|
||||||
export default ({pathContext}) => (
|
export default ({pathContext}) => (
|
||||||
<Page>
|
<Page className="doc-block">
|
||||||
<Playground
|
<Playground
|
||||||
selectedNodePath={[]}
|
selectedNodePath={[]}
|
||||||
showGuides={false}
|
showGuides={false}
|
||||||
renderSidebar={(layout, onChange) => (
|
renderSidebar={(layout, onChange) => (
|
||||||
<DocsSidebar>
|
<DocsSidebar>
|
||||||
<Link to="/docs">
|
<div className="markdown" dangerouslySetInnerHTML={{__html: pathContext.html}} />
|
||||||
<Icon type="left-circle-o" /> back to overview
|
|
||||||
</Link>
|
|
||||||
<div dangerouslySetInnerHTML={{__html: pathContext.html}} />
|
|
||||||
{pathContext.frontmatter.editableProperties && (
|
|
||||||
<Row type="flex" align="bottom">
|
|
||||||
<Col span={12}>
|
|
||||||
<h3>Try it out</h3>
|
|
||||||
</Col>
|
|
||||||
<Col span={12}>
|
|
||||||
<Link to="/playground">
|
|
||||||
<Icon type="export" /> Open in playground
|
|
||||||
</Link>
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
)}
|
|
||||||
{(pathContext.frontmatter.editableProperties || []).map(prop => (
|
{(pathContext.frontmatter.editableProperties || []).map(prop => (
|
||||||
<div key={prop}>
|
<div key={prop} className="prop">
|
||||||
<h4>{prop}</h4>
|
<h4>{prop}</h4>
|
||||||
<EditValue
|
<EditValue
|
||||||
property={prop}
|
property={prop}
|
||||||
@@ -51,6 +38,10 @@ export default ({pathContext}) => (
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
<Link to="/docs" className="overview">
|
||||||
|
BACK TO OVERVIEW
|
||||||
|
</Link>
|
||||||
</DocsSidebar>
|
</DocsSidebar>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
@@ -19,7 +19,7 @@ import './index.css';
|
|||||||
|
|
||||||
export default ({pathContext}) => {
|
export default ({pathContext}) => {
|
||||||
return (
|
return (
|
||||||
<Page className="doc-block">
|
<Page className="doc-block no-playground">
|
||||||
<Padded>
|
<Padded>
|
||||||
<Row>
|
<Row>
|
||||||
<Col xl={16} lg={16} md={24} sm={24} xs={24}>
|
<Col xl={16} lg={16} md={24} sm={24} xs={24}>
|
||||||
|
Reference in New Issue
Block a user