File tree 3 files changed +44
-2
lines changed
packages/main/src/components 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
37
37
38
38
<Canvas of = { ComponentStories .SectionWithCustomHeader } />
39
39
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
+
40
56
<Markdown >{ SubcomponentsSection } </Markdown >
41
57
42
58
## DynamicPageTitle
Original file line number Diff line number Diff line change @@ -416,3 +416,26 @@ export const SectionWithCustomHeader: Story = {
416
416
) ;
417
417
}
418
418
} ;
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 = {
44
44
}
45
45
} ,
46
46
sectionContent : {
47
- whiteSpace : 'normal'
47
+ whiteSpace : 'normal' ,
48
+ height : '100%'
48
49
} ,
49
50
sectionContentInner : {
50
51
paddingBlock : '0.5rem' ,
51
- fontFamily : ThemingParameters . sapFontFamily
52
+ fontFamily : ThemingParameters . sapFontFamily ,
53
+ height : '100%' ,
54
+ boxSizing : 'border-box'
52
55
}
53
56
} ;
54
57
You can’t perform that action at this time.
0 commit comments