File tree Expand file tree Collapse file tree 3 files changed +44
-2
lines changed
packages/main/src/components Expand file tree Collapse file tree 3 files changed +44
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,22 @@ With these objectes it's possible to e.g. configure the overflow button displaye
3737
3838<Canvas of = { ComponentStories .SectionWithCustomHeader } />
3939
40+ ## TabBar ObjectPage with fullscreen section
41+
42+ To render a single section in fullscreen mode, set its height to ` 100% ` .
43+
44+ ** Note:** This is only supported for sections in ` TabBar ` mode! Using multiple sections with ` height: 100%; ` on the same page will most probably break your layout.
45+
46+ <Canvas of = { ComponentStories .FullScreenSingleSection } />
47+
48+ ### Example section
49+
50+ ``` jsx
51+ < ObjectPageSection titleText= " Section with Overflow" id= " section3" style= {{ height: ' 100%' , overflow: ' auto' }}>
52+ < div style= {{ height: ' 300%' , background: ' lightyellow' }} / >
53+ < / ObjectPageSection>
54+ ```
55+
4056<Markdown >{ SubcomponentsSection } </Markdown >
4157
4258## DynamicPageTitle
Original file line number Diff line number Diff line change @@ -416,3 +416,26 @@ export const SectionWithCustomHeader: Story = {
416416 ) ;
417417 }
418418} ;
419+
420+ export const FullScreenSingleSection : Story = {
421+ args : { selectedSectionId : 'section1' } ,
422+ name : 'with fullscreen section' ,
423+ render ( args ) {
424+ return (
425+ < ObjectPage { ...args } mode = { ObjectPageMode . IconTabBar } >
426+ < ObjectPageSection titleText = "Section 1" id = "section1" style = { { height : '100%' } } >
427+ < div style = { { height : '100%' , background : 'lightblue' } } >
428+ It is recommended to only use fullscreen sections in TabBar mode, otherwise your layout will most probably
429+ break!
430+ </ div >
431+ </ ObjectPageSection >
432+ < ObjectPageSection titleText = "Section 2" id = "section2" style = { { height : '100%' } } >
433+ < div style = { { height : '100%' , background : 'lightgreen' } } />
434+ </ ObjectPageSection >
435+ < ObjectPageSection titleText = "Section with Overflow" id = "section3" style = { { height : '100%' , overflow : 'auto' } } >
436+ < div style = { { height : '300%' , background : 'lightyellow' } } />
437+ </ ObjectPageSection >
438+ </ ObjectPage >
439+ ) ;
440+ }
441+ } ;
Original file line number Diff line number Diff line change @@ -44,11 +44,14 @@ const styles = {
4444 }
4545 } ,
4646 sectionContent : {
47- whiteSpace : 'normal'
47+ whiteSpace : 'normal' ,
48+ height : '100%'
4849 } ,
4950 sectionContentInner : {
5051 paddingBlock : '0.5rem' ,
51- fontFamily : ThemingParameters . sapFontFamily
52+ fontFamily : ThemingParameters . sapFontFamily ,
53+ height : '100%' ,
54+ boxSizing : 'border-box'
5255 }
5356} ;
5457
You can’t perform that action at this time.
0 commit comments