Skip to content

Commit

Permalink
fix(layout): fix FooterToolBar width error
Browse files Browse the repository at this point in the history
close #7333
  • Loading branch information
chenshuai2144 committed Jul 17, 2023
1 parent 03927db commit 54d9afe
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion packages/layout/src/ProLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ const getpaddingInlineStart = (
siderWidth: number,
): number | undefined => {
if (hasLeftPadding) {
return collapsed ? 60 : siderWidth;
return collapsed ? 64 : siderWidth;
}
return 0;
};
Expand Down
4 changes: 2 additions & 2 deletions tests/descriptions/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ exports[`descriptions demos 📸 renders ./packages/descriptions/src/demos/base.
class="ant-descriptions-item-content"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
Expand Down Expand Up @@ -756,7 +756,7 @@ Done in 9.70s.
class="ant-descriptions-item-content"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
{
Expand Down
4 changes: 2 additions & 2 deletions tests/field/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ exports[`field demos 📸 renders ./packages/field/src/demos/base.tsx correctly
class="ant-descriptions-item-content"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
Expand Down Expand Up @@ -1390,7 +1390,7 @@ Done in 9.70s.
class="ant-descriptions-item-content"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
{
Expand Down
8 changes: 4 additions & 4 deletions tests/field/__snapshots__/field.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3579,7 +3579,7 @@ exports[`Field 🐴 read and plain 1`] = `
class="ant-descriptions-item-content"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
Expand Down Expand Up @@ -3608,7 +3608,7 @@ Done in 9.70s.
class="ant-descriptions-item-content"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
{
Expand Down Expand Up @@ -4129,7 +4129,7 @@ exports[`Field 🐴 read ant no plain 1`] = `
class="ant-descriptions-item-content"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
Expand Down Expand Up @@ -4158,7 +4158,7 @@ Done in 9.70s.
class="ant-descriptions-item-content"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
{
Expand Down
4 changes: 2 additions & 2 deletions tests/form/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11931,7 +11931,7 @@ exports[`form demos 📸 renders ./packages/form/src/components/Group/demos/cust
</div>
</div>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
{
Expand Down Expand Up @@ -49115,7 +49115,7 @@ exports[`form demos 📸 renders ./packages/form/src/demos/layout-footer.tsx cor
</div>
<div
class="ant-pro-footer-bar"
style="width: calc(100% - 60px);"
style="width: calc(100% - 64px);"
>
<div
class="ant-pro-footer-bar-left"
Expand Down
4 changes: 2 additions & 2 deletions tests/layout/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,7 @@ exports[`layout demos 📸 renders ./packages/layout/src/components/WaterMark/de
role="separator"
/>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
&lt;WaterMark
Expand Down Expand Up @@ -14286,7 +14286,7 @@ exports[`layout demos 📸 renders ./packages/layout/src/demos/collapsedShowTitl
</div>
<div
class="ant-pro-footer-bar"
style="width: calc(100% - 60px);"
style="width: calc(100% - 64px);"
>
<div
class="ant-pro-footer-bar-left"
Expand Down
4 changes: 2 additions & 2 deletions tests/layout/pageContainer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ describe('PageContainer', () => {
);

expect(container.querySelector('.ant-pro-footer-bar')).toHaveStyle(
'width: calc(100% - 60px)',
'width: calc(100% - 64px)',
);

rerender(
Expand Down Expand Up @@ -332,7 +332,7 @@ describe('PageContainer', () => {
);

expect(container.querySelector('.ant-pro-footer-bar')).toHaveStyle(
'width: calc(100% - 60px)',
'width: calc(100% - 64px)',
);

rerender(
Expand Down
20 changes: 10 additions & 10 deletions tests/table/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2917,7 +2917,7 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
class="ant-pro-card-body"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px; width: 100%;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px; width: 100%;"
>
<code>
[
Expand Down Expand Up @@ -3357,7 +3357,7 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
class="ant-pro-card-body"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px; width: 100%;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px; width: 100%;"
>
<code>
[
Expand Down Expand Up @@ -3738,7 +3738,7 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
class="ant-pro-card-body"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px; width: 100%;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px; width: 100%;"
>
<code>
[
Expand Down Expand Up @@ -4249,7 +4249,7 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
class="ant-pro-card-body"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px; width: 100%;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px; width: 100%;"
>
<code>
[
Expand Down Expand Up @@ -10549,7 +10549,7 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
class="ant-pro-card-body"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px; width: 100%;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px; width: 100%;"
>
<code>
[
Expand Down Expand Up @@ -44104,7 +44104,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/split.tsx correctly
class="ant-table-cell"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
const getData = async params =&gt; {
Expand Down Expand Up @@ -44139,7 +44139,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/split.tsx correctly
class="ant-table-cell"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
const getData = async params =&gt; {
Expand Down Expand Up @@ -44174,7 +44174,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/split.tsx correctly
class="ant-table-cell"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
const getData = async params =&gt; {
Expand Down Expand Up @@ -46315,7 +46315,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/valueType.tsx corre
class="ant-table-cell"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
const getData = async params =&gt; {
Expand Down Expand Up @@ -46439,7 +46439,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/valueType.tsx corre
class="ant-table-cell"
>
<pre
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px;"
style="padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; color: rgba(0, 0, 0, 0.65); font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; background-color: rgba(150, 150, 150, 0.1); border-radius: 3px;"
>
<code>
const getData = async params =&gt; {
Expand Down

0 comments on commit 54d9afe

Please sign in to comment.