docs(Layout): update demo style to sticky (#38542)

* Update fixed.md

* Update demo.test.ts.snap

* update snapshot
This commit is contained in:
周晨阳 2022-11-14 11:16:34 +08:00 committed by GitHub
parent 2f38076b3d
commit 6a5f53d6e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -420,7 +420,7 @@ exports[`renders ./components/layout/demo/fixed.md extend context correctly 1`]
>
<header
class="ant-layout-header"
style="position:fixed;z-index:1;width:100%"
style="position:sticky;top:0;z-index:1;width:100%"
>
<div
class="logo"
@ -656,7 +656,7 @@ exports[`renders ./components/layout/demo/fixed.md extend context correctly 1`]
</header>
<main
class="ant-layout-content site-layout"
style="padding:0 50px;margin-top:64px"
style="padding:0 50px"
>
<nav
class="ant-breadcrumb"

View File

@ -287,7 +287,7 @@ exports[`renders ./components/layout/demo/fixed.md correctly 1`] = `
>
<header
class="ant-layout-header"
style="position:fixed;z-index:1;width:100%"
style="position:sticky;top:0;z-index:1;width:100%"
>
<div
class="logo"
@ -379,7 +379,7 @@ exports[`renders ./components/layout/demo/fixed.md correctly 1`] = `
</header>
<main
class="ant-layout-content site-layout"
style="padding:0 50px;margin-top:64px"
style="padding:0 50px"
>
<nav
class="ant-breadcrumb"

View File

@ -22,7 +22,7 @@ const { Header, Content, Footer } = Layout;
const App: React.FC = () => (
<Layout>
<Header style={{ position: 'fixed', zIndex: 1, width: '100%' }}>
<Header style={{ position: 'sticky', top: 0, zIndex: 1, width: '100%' }}>
<div className="logo" />
<Menu
theme="dark"
@ -34,7 +34,7 @@ const App: React.FC = () => (
}))}
/>
</Header>
<Content className="site-layout" style={{ padding: '0 50px', marginTop: 64 }}>
<Content className="site-layout" style={{ padding: '0 50px' }}>
<Breadcrumb style={{ margin: '16px 0' }}>
<Breadcrumb.Item>Home</Breadcrumb.Item>
<Breadcrumb.Item>List</Breadcrumb.Item>