From 6de077ef22df74540fd0ef05feff31f459c20b93 Mon Sep 17 00:00:00 2001 From: Brad White Date: Wed, 16 Apr 2025 10:59:08 -0600 Subject: [PATCH] [SB] Fix graph layout stories (#217766) ## Summary This fixes the graph layout stories not rendering properly after #214684. Open to a better or preferred fix as I'm not familiar with these components. There was a console warning: ```js [React Flow]: The React Flow parent container needs a width and a height to render the graph. Help: https://reactflow.dev/error#004 ``` [Storybook preview link](https://ci-artifacts.kibana.dev/storybooks/pr-217766/cloud_security_posture_graph/index.html?path=/story/components-graph-components-graph-layout--simple-api-mock) --------- Co-authored-by: Kfir Peled <61654899+kfirpeled@users.noreply.github.com> (cherry picked from commit a7796cd0d00453f67d0f5c4366352c53d6c63131) --- .../graph/.storybook/decorators/global_styles_decorator.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/.storybook/decorators/global_styles_decorator.tsx b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/.storybook/decorators/global_styles_decorator.tsx index 5e26972cc1c0c..5c380c32ea2bd 100644 --- a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/.storybook/decorators/global_styles_decorator.tsx +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/.storybook/decorators/global_styles_decorator.tsx @@ -10,7 +10,7 @@ import { Global, css } from '@emotion/react'; const globalStyles = css` html, body, - #root { + #storybook-root { width: 100%; height: 100%; margin: 0;