From a6b7e341877ff9d823089d2c6239b0bb96b824cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Sj=C3=B6lander?= Date: Tue, 13 Feb 2018 11:27:37 -0800 Subject: [PATCH] Go over property descriptions and add documentation links Reviewed By: danielbuechele Differential Revision: D6977090 fbshipit-source-id: cc8a6acda8b9b7f007ad0a2f83249d4e6037bb0f --- website/src/components/Playground/Editor.js | 42 ++++++------------- .../src/components/Playground/InfoText.css | 6 +++ website/src/components/Playground/InfoText.js | 12 +++++- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/website/src/components/Playground/Editor.js b/website/src/components/Playground/Editor.js index 56b4cda2..b26b50bc 100644 --- a/website/src/components/Playground/Editor.js +++ b/website/src/components/Playground/Editor.js @@ -58,10 +58,7 @@ export default class Editor extends Component {

Direction - - The direction property specifies the text direction/writing - direction - + Defines the direction of which text and items are laid out

{ />

Flex direction - Defining the direction of the main-axis + Defines the direction of the main-axis

{

Flex grow - - Grow factor defined how much space this element should take - up, relative to it's siblings - + The factor of remaining space should be given to this node

{

Flex shrink - - Shrink factor if elements don't fit into the parent node - anymore. - + The shrink factor of this element if parent has no space left

{

Flex wrap - - Wrapping behaviour when child nodes don't fit into a single line - + Wrapping behaviour when child nodes don't fit into a single line

{

Justify content - Aligns child nodes along the main-axis + Aligns child nodes along the main-axis

{

Align items - Aligns child nodes along the cross-axis + Aligns child nodes along the cross-axis

{

Align self - - Specifies alignment on the cross-axis for the node itself - + Override align items of parent

{

Align content - - Alignment of lines along the cross-axis when wrapping - + Alignment of lines along the cross-axis when wrapping

{

Width × height - Dimensions of the node + Dimensions of the node

@@ -206,10 +191,7 @@ export default class Editor extends Component {

Aspect ratio - - Aspect radio is an additon by Yoga which is handy e.g. for nodes - displaying videos - + Width/Height aspect ratio of node

{ ))}

Position - + Relative position offsets the node from it's calculated position. Absolute position removes the node from the flexbox flow and positions it at the given position. diff --git a/website/src/components/Playground/InfoText.css b/website/src/components/Playground/InfoText.css index 5629917b..788e4eef 100644 --- a/website/src/components/Playground/InfoText.css +++ b/website/src/components/Playground/InfoText.css @@ -12,6 +12,12 @@ line-height: 130%; } +.InfoText .docs-link { + margin-top: 0px; + font-size: 12px; + font-weight: 600; +} + .InfoTextIcon { margin-left: 5px; opacity: 0.5; diff --git a/website/src/components/Playground/InfoText.js b/website/src/components/Playground/InfoText.js index 6f2aab17..8add2d4b 100644 --- a/website/src/components/Playground/InfoText.js +++ b/website/src/components/Playground/InfoText.js @@ -12,17 +12,27 @@ import React, {Component} from 'react'; import {Popover, Icon} from 'antd'; +import Link from 'gatsby-link'; import './InfoText.css'; type Props = { children: any, + doclink: string, }; export default class InfoText extends Component { render() { return ( {this.props.children}} + content={ +
+ { + [ +

{[...this.props.children]}

, + DOCUMENTATION] + } +
+ } trigger="hover">