From 11367129793377333954d1a535260dc647f660e0 Mon Sep 17 00:00:00 2001 From: Akira Sudoh Date: Mon, 16 Dec 2019 14:25:36 +0900 Subject: [PATCH] fix(devenv): use content margin style for expanded side nav This change ensures that the fixed side nav stories make use of `margin-left` style for `.bx--content` with `.bx--side-nav--expanded` instead of using responsive left margin `v10` grid defines, so that the main content won't be hidden underneath the fixed side nav when fixed it's expanded. Fixes #3591. --- .../src/components/UIShell/UIShell-story.js | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/packages/react/src/components/UIShell/UIShell-story.js b/packages/react/src/components/UIShell/UIShell-story.js index edbd4c1c941a..cfde08a39510 100644 --- a/packages/react/src/components/UIShell/UIShell-story.js +++ b/packages/react/src/components/UIShell/UIShell-story.js @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +import cx from 'classnames'; + import { Search20, Notification20, AppSwitcher20 } from '@carbon/icons-react'; import { storiesOf } from '@storybook/react'; @@ -56,11 +58,15 @@ const Fade16 = () => ( ); -const StoryContent = () => { +const StoryContent = ({ useResponsiveOffset = true }) => { + const classNameFirstColumn = cx({ + 'bx--col-lg-13': true, + 'bx--offset-lg-3': useResponsiveOffset, + }); const content = (
-
+

Purpose and function

@@ -114,14 +120,15 @@ const StoryContent = () => {
); + const style = { + height: '100%', + }; + if (useResponsiveOffset) { + style.margin = '0'; + style.width = '100%'; + } return ( - + {content} ); @@ -595,7 +602,7 @@ storiesOf('UI Shell', module) L0 link - + )) ) @@ -637,7 +644,7 @@ storiesOf('UI Shell', module) - + )) )