From f8c0fd9b95b524934fc532ac4bcbd82bde022150 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Mon, 25 Jan 2021 13:18:52 -0600 Subject: [PATCH] revert me --- .../resizable_container_basic.js | 49 ++++++++++++------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/src-docs/src/views/resizable_container/resizable_container_basic.js b/src-docs/src/views/resizable_container/resizable_container_basic.js index c9e1d4fc159..cd2e441b6b1 100644 --- a/src-docs/src/views/resizable_container/resizable_container_basic.js +++ b/src-docs/src/views/resizable_container/resizable_container_basic.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useEffect, useRef, useState } from 'react'; import { EuiText, EuiResizableContainer } from '../../../../src/components'; import { fake } from 'faker'; @@ -10,23 +10,34 @@ const text = ( ); -export default () => ( - - {(EuiResizablePanel, EuiResizableButton) => ( - <> - - -
{text}
- Hello world -
-
+export default () => { + const dom = useRef(); + const [styles, setStyles] = useState({ display: 'none' }); + useEffect(() => { + if (!dom.current) return; + dom.current.innerHTML = 'YOLO'; + }); + useEffect(() => { + setTimeout(() => setStyles({ display: 'flex' }), 1000); + }, []); + return ( + + {(EuiResizablePanel, EuiResizableButton) => ( + <> + + +
{text}
+ Hello world +
+
- + - - {text} - - - )} -
-); + +
+ + + )} + + ); +};