From 9eb03b1bcd97c949548ce172daac6687dd5b85f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Sj=C3=B6lander?= Date: Tue, 13 Feb 2018 03:50:40 -0800 Subject: [PATCH] playground doc page first draft Reviewed By: danielbuechele Differential Revision: D6968725 fbshipit-source-id: 588018a347a723b32e4dcab407c4da2db0d85130 --- website/src/templates/index.css | 11 +++++++-- website/src/templates/withPlayground.js | 27 ++++++++-------------- website/src/templates/withoutPlayground.js | 2 +- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/website/src/templates/index.css b/website/src/templates/index.css index db4c06a2..6d698dfb 100644 --- a/website/src/templates/index.css +++ b/website/src/templates/index.css @@ -1,6 +1,9 @@ -.doc-block .markdown { +.no-playground .markdown { padding-top: 50px; - padding-bottom: 50px; +} + +.doc-block .markdown { + padding-bottom: 20px; } .doc-block .overview { @@ -34,4 +37,8 @@ line-height: 180%; font-size: 14px; font-weight: 400; +} + +.doc-block .prop { + margin-bottom: 20px; } \ No newline at end of file diff --git a/website/src/templates/withPlayground.js b/website/src/templates/withPlayground.js index 090b59da..036a2362 100644 --- a/website/src/templates/withPlayground.js +++ b/website/src/templates/withPlayground.js @@ -17,32 +17,19 @@ import DocsSidebar from '../components/DocsSidebar'; import EditValue from '../components/Playground/EditValue'; import Link from 'gatsby-link'; import {Button, Icon, Row, Col} from 'antd'; +import './index.css'; export default ({pathContext}) => ( - + ( - - back to overview - -
- {pathContext.frontmatter.editableProperties && ( - - -

Try it out

- - - - Open in playground - - -
- )} +
+ {(pathContext.frontmatter.editableProperties || []).map(prop => ( -
+

{prop}

( />
))} + + + BACK TO OVERVIEW + )} /> diff --git a/website/src/templates/withoutPlayground.js b/website/src/templates/withoutPlayground.js index af50a860..157ad3c6 100644 --- a/website/src/templates/withoutPlayground.js +++ b/website/src/templates/withoutPlayground.js @@ -19,7 +19,7 @@ import './index.css'; export default ({pathContext}) => { return ( - +