11import { useState } from 'react' ;
22
33import { Button , ItemButton } from '../../actions' ;
4+ import { Block } from '../../Block' ;
45import { Space } from '../../layout/Space' ;
56import { Text } from '../Text' ;
67import { Title } from '../Title' ;
@@ -374,17 +375,13 @@ export const NestedLayouts: Story = {
374375 < Layout . Header title = "Nested Layouts" />
375376 < Layout flow = "row" >
376377 < Layout width = "200px" border = "right" >
377- < Layout . Content padding = "1x" >
378+ < Layout . Content >
378379 < Text > Left sidebar</ Text >
379380 </ Layout . Content >
380381 </ Layout >
381382 < Layout >
382- < Layout . Toolbar >
383- < Text > Inner toolbar</ Text >
384- </ Layout . Toolbar >
385- < Layout . Content padding = "2x" >
386- < Text > Main content</ Text >
387- </ Layout . Content >
383+ < Layout . Toolbar > Inner toolbar</ Layout . Toolbar >
384+ < Layout . Content > Main content</ Layout . Content >
388385 </ Layout >
389386 </ Layout >
390387 </ Layout >
@@ -419,10 +416,8 @@ export const MultiplePanels: Story = {
419416 </ Layout . Content >
420417 </ Layout . Panel >
421418 < Layout . Toolbar >
422- < Space >
423- < Button onPress = { ( ) => setLeftOpen ( ! leftOpen ) } > Left</ Button >
424- < Button onPress = { ( ) => setRightOpen ( ! rightOpen ) } > Right</ Button >
425- </ Space >
419+ < Button onPress = { ( ) => setLeftOpen ( ! leftOpen ) } > Left</ Button >
420+ < Button onPress = { ( ) => setRightOpen ( ! rightOpen ) } > Right</ Button >
426421 </ Layout . Toolbar >
427422 < Layout . Content padding = "2x" >
428423 < Text > Main content between two panels</ Text >
@@ -432,6 +427,27 @@ export const MultiplePanels: Story = {
432427 } ,
433428} ;
434429
430+ export const HorizontalScrollableContent : Story = {
431+ render : ( ) => (
432+ < Space width = "500px" height = "(5x - 2bw)" >
433+ < Layout . Block fill = "#light" placeSelf = "center" >
434+ Fixed Left
435+ </ Layout . Block >
436+ < Layout . Content scrollbar = "tiny" placeContent = "center" >
437+ < Text nowrap >
438+ This is a very long line of text that should not wrap and will cause
439+ horizontal scrolling when it exceeds the container width →→→→→→→→→→→
440+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
441+ eiusmod tempor incididunt ut labore et dolore magna aliqua →→→→→→→→
442+ </ Text >
443+ </ Layout . Content >
444+ < Layout . Block fill = "#light" placeSelf = "center" >
445+ Fixed Right
446+ </ Layout . Block >
447+ </ Space >
448+ ) ,
449+ } ;
450+
435451export const CompleteApplicationShell : Story = {
436452 render : function CompleteApplicationShellStory ( ) {
437453 const [ sidebarOpen , setSidebarOpen ] = useState ( true ) ;
0 commit comments