Skip to content

Commit

Permalink
change the prop className of the Header, Footer and Content to the last
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyo837 committed Jan 22, 2020
1 parent 58133bc commit e728f40
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="site-layout-background ant-layout-header"
class="ant-layout-header site-layout-background"
style="padding:0"
>
<span
Expand All @@ -261,7 +261,7 @@ exports[`renders ./components/layout/demo/custom-trigger.md correctly 1`] = `
</span>
</header>
<main
class="site-layout-background ant-layout-content"
class="ant-layout-content site-layout-background"
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="site-layout ant-layout-content"
class="ant-layout-content site-layout"
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="site-layout-background ant-layout-header"
class="ant-layout-header site-layout-background"
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="site-layout-sub-header-background ant-layout-header"
class="ant-layout-header site-layout-sub-header-background"
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="site-layout-background ant-layout-header"
class="ant-layout-header site-layout-background"
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="header ant-layout-header"
class="ant-layout-header 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="header ant-layout-header"
class="ant-layout-header 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="site-layout-background ant-layout-content"
class="ant-layout-content site-layout-background"
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(className, prefixCls);
const classString = classNames(prefixCls, className);
return React.createElement(tagName, { className: classString, ...others }, children);
};

Expand Down

0 comments on commit e728f40

Please sign in to comment.