diff --git a/website-next/src/components/Playground/index.css b/website-next/src/components/Playground/index.css index d81174deb9..8a835c31ac 100644 --- a/website-next/src/components/Playground/index.css +++ b/website-next/src/components/Playground/index.css @@ -5,19 +5,14 @@ * LICENSE file in the root directory of this source tree. */ - .PlaygroundContainer { +.PlaygroundContainer { display: flex; flex-direction: row; flex-grow: 1; width: 100%; } -.Playground { - display: flex; - flex-grow: 1; - position: relative; - width: 100%; - overflow: hidden; +.playground-background { background: linear-gradient(-90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px), linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px), linear-gradient(-90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px), @@ -41,6 +36,15 @@ 100px 100px, 100px 100px, 100px 100px; } +.Playground { + display: flex; + flex-grow: 1; + position: relative; + width: 100%; + overflow: hidden; + animation: playground-content-fade-in-frames 50ms ease-in; +} + .Playground > .YogaNode { margin: auto; position: static; @@ -72,3 +76,12 @@ .ant-modal-content { overflow: hidden; } + +@keyframes playground-content-fade-in-frames { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} diff --git a/website-next/src/components/Playground/index.tsx b/website-next/src/components/Playground/index.tsx index 19f90e7482..410798fd67 100644 --- a/website-next/src/components/Playground/index.tsx +++ b/website-next/src/components/Playground/index.tsx @@ -235,52 +235,58 @@ export default class Playground extends Component { : null; const playground = ( -
{ - this._containerRef = ref; - }}> - this.setState({selectedNodePath})} - onDoubleClick={this.onAdd} - direction={direction} - showGuides={this.props.showGuides} - /> - {!this.props.renderSidebar && ( - - {this.state.selectedNodePath ? ( - this.setState({[key]: value})} - direction={direction} - onRemove={ - selectedNodePath && selectedNodePath.length > 0 - ? this.onRemove - : undefined - } - onAdd={ - selectedNodePath && - selectedNodePath.length < this.props.maxDepth - ? this.onAdd - : undefined - } - /> - ) : ( -
- Select a node to edit its properties -
- )} -
- )} +
+
{ + this._containerRef = ref; + }}> + this.setState({selectedNodePath})} + onDoubleClick={this.onAdd} + direction={direction} + showGuides={this.props.showGuides} + /> + {!this.props.renderSidebar && ( + + {this.state.selectedNodePath ? ( + + this.setState({[key]: value}) + } + direction={direction} + onRemove={ + selectedNodePath && selectedNodePath.length > 0 + ? this.onRemove + : undefined + } + onAdd={ + selectedNodePath && + selectedNodePath.length < this.props.maxDepth + ? this.onAdd + : undefined + } + /> + ) : ( +
+ Select a node to edit its properties +
+ )} +
+ )} +
); diff --git a/website-next/src/pages/index.tsx b/website-next/src/pages/index.tsx index ff54a584b8..f3f933f1e2 100644 --- a/website-next/src/pages/index.tsx +++ b/website-next/src/pages/index.tsx @@ -38,15 +38,17 @@ const LazyPlayground = React.lazy(() => import('../components/Playground')); function ClientPlayground() { const fallback =
; - return - {() => ( - - - - )} -; -} + return ( + + {() => ( + + + + )} + + ); +} export default function Home(): JSX.Element { const {siteConfig} = useDocusaurusContext();