From 4da3a41461863e09924966010032983d0c769285 Mon Sep 17 00:00:00 2001 From: Mikhail Shatikhin Date: Tue, 21 May 2024 10:50:49 +0500 Subject: [PATCH] chore: story for popup --- .../__stories__/sandbox.stories.tsx | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 packages/react-ui/components/__stories__/sandbox.stories.tsx diff --git a/packages/react-ui/components/__stories__/sandbox.stories.tsx b/packages/react-ui/components/__stories__/sandbox.stories.tsx new file mode 100644 index 00000000000..259fb0ec4ac --- /dev/null +++ b/packages/react-ui/components/__stories__/sandbox.stories.tsx @@ -0,0 +1,38 @@ +import React, { useEffect, useRef, useState } from 'react'; + +import { Meta } from '../../typings/stories'; +import { Tooltip } from '../Tooltip'; +import { Hint } from '../Hint'; +import { Gapped } from '../Gapped'; +import { WidgetContainer } from '../../lib/widgets'; + +export default { + title: 'Sandbox', +} as Meta; + +export const Default = () => { + const root = useRef(null); + const [_, forceUpdate] = useState(); + + useEffect(() => forceUpdate(Date.now), [root.current]); + + return ( +
+
+ {root.current && ( + +
+ +
Tooltip
}> +
Tooltip
+
+ +
Hint
+
+
+
+
+ )} +
+ ); +};