docs: simplified Layout component sample code (#36497)

the component example code expands to take up the entire monitor screen and is not well read
This commit is contained in:
Wuxh 2022-07-13 16:57:18 +08:00 committed by GitHub
parent 008681c1bf
commit c86d02e03f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 254 additions and 123 deletions

View File

@ -1361,18 +1361,9 @@ exports[`renders ./components/layout/demo/fixed-sider.md extend context correctl
class="site-layout-background"
style="padding:24px;text-align:center"
>
...
<br />
Really
<br />
...
<br />
...
<br />
...
<br />
long
<br />
<p>
long content
</p>
...
<br />
...
@ -1413,7 +1404,7 @@ exports[`renders ./components/layout/demo/fixed-sider.md extend context correctl
<br />
...
<br />
...
more
<br />
...
<br />
@ -1453,9 +1444,126 @@ exports[`renders ./components/layout/demo/fixed-sider.md extend context correctl
<br />
...
<br />
more
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
more
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
more
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
content
</div>
</main>
<footer

View File

@ -731,18 +731,9 @@ exports[`renders ./components/layout/demo/fixed-sider.md correctly 1`] = `
class="site-layout-background"
style="padding:24px;text-align:center"
>
...
<br />
Really
<br />
...
<br />
...
<br />
...
<br />
long
<br />
<p>
long content
</p>
...
<br />
...
@ -783,7 +774,7 @@ exports[`renders ./components/layout/demo/fixed-sider.md correctly 1`] = `
<br />
...
<br />
...
more
<br />
...
<br />
@ -823,9 +814,126 @@ exports[`renders ./components/layout/demo/fixed-sider.md correctly 1`] = `
<br />
...
<br />
more
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
more
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
more
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
content
</div>
</main>
<footer

View File

@ -65,101 +65,16 @@ const App: React.FC = () => (
<Header className="site-layout-background" style={{ padding: 0 }} />
<Content style={{ margin: '24px 16px 0', overflow: 'initial' }}>
<div className="site-layout-background" style={{ padding: 24, textAlign: 'center' }}>
...
<br />
Really
<br />
...
<br />
...
<br />
...
<br />
long
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
...
<br />
content
<p>long content</p>
{
// indicates very long content
Array.from({ length: 100 }, (_, index) => (
<React.Fragment key={index}>
{index % 20 === 0 && index ? 'more' : '...'}
<br />
</React.Fragment>
))
}
</div>
</Content>
<Footer style={{ textAlign: 'center' }}>Ant Design ©2018 Created by Ant UED</Footer>