Skip to content

Commit

Permalink
Revert "change the prop className of the Header, Footer and Content t…
Browse files Browse the repository at this point in the history
…o the last"

This reverts commit e728f40.
  • Loading branch information
yoyo837 committed Jan 22, 2020
1 parent e728f40 commit ca8ea41
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions components/layout/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ exports[`renders ./components/layout/demo/custom-trigger.md correctly 1`] = `
class="ant-layout site-layout"
>
<header
class="ant-layout-header site-layout-background"
class="site-layout-background ant-layout-header"
style="padding:0"
>
<span
Expand All @@ -261,7 +261,7 @@ exports[`renders ./components/layout/demo/custom-trigger.md correctly 1`] = `
</span>
</header>
<main
class="ant-layout-content site-layout-background"
class="site-layout-background ant-layout-content"
style="margin:24px 16px;padding:24px;min-height:280px"
>
Content
Expand Down Expand Up @@ -379,7 +379,7 @@ exports[`renders ./components/layout/demo/fixed.md correctly 1`] = `
</ul>
</header>
<main
class="ant-layout-content site-layout"
class="site-layout ant-layout-content"
style="padding:0 50px;margin-top:64px"
>
<div
Expand Down Expand Up @@ -713,7 +713,7 @@ exports[`renders ./components/layout/demo/fixed-sider.md correctly 1`] = `
style="margin-left:200px"
>
<header
class="ant-layout-header site-layout-background"
class="site-layout-background ant-layout-header"
style="padding:0"
/>
<main
Expand Down Expand Up @@ -980,7 +980,7 @@ exports[`renders ./components/layout/demo/responsive.md correctly 1`] = `
class="ant-layout"
>
<header
class="ant-layout-header site-layout-sub-header-background"
class="site-layout-sub-header-background ant-layout-header"
style="padding:0"
/>
<main
Expand Down Expand Up @@ -1221,7 +1221,7 @@ exports[`renders ./components/layout/demo/side.md correctly 1`] = `
class="ant-layout site-layout"
>
<header
class="ant-layout-header site-layout-background"
class="site-layout-background ant-layout-header"
style="padding:0"
/>
<main
Expand Down Expand Up @@ -1446,7 +1446,7 @@ exports[`renders ./components/layout/demo/top-side.md correctly 1`] = `
class="ant-layout"
>
<header
class="ant-layout-header header"
class="header ant-layout-header"
>
<div
class="logo"
Expand Down Expand Up @@ -1785,7 +1785,7 @@ exports[`renders ./components/layout/demo/top-side-2.md correctly 1`] = `
class="ant-layout"
>
<header
class="ant-layout-header header"
class="header ant-layout-header"
>
<div
class="logo"
Expand Down Expand Up @@ -2102,7 +2102,7 @@ exports[`renders ./components/layout/demo/top-side-2.md correctly 1`] = `
</span>
</div>
<main
class="ant-layout-content site-layout-background"
class="site-layout-background ant-layout-content"
style="padding:24px;margin:0;min-height:280px"
>
Content
Expand Down
2 changes: 1 addition & 1 deletion components/layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function generator({ suffixCls, tagName }: GeneratorProps) {

const Basic = (props: BasicPropsWithTagName) => {
const { prefixCls, className, children, tagName, ...others } = props;
const classString = classNames(prefixCls, className);
const classString = classNames(className, prefixCls);
return React.createElement(tagName, { className: classString, ...others }, children);
};

Expand Down

0 comments on commit ca8ea41

Please sign in to comment.