Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Steps progress circle size & rtl style when use progress #26075

Merged
merged 3 commits into from Aug 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions components/steps/__tests__/__snapshots__/demo.test.js.snap
Expand Up @@ -1273,7 +1273,7 @@ exports[`renders ./components/steps/demo/progress.md correctly 1`] = `
>
<div
class="ant-progress-inner"
style="width:38px;height:38px;font-size:11.7px"
style="width:40px;height:40px;font-size:12px"
>
<svg
class="ant-progress-circle"
Expand Down Expand Up @@ -1508,7 +1508,7 @@ Array [
>
<div
class="ant-progress-inner"
style="width:38px;height:38px;font-size:11.7px"
style="width:40px;height:40px;font-size:12px"
>
<svg
class="ant-progress-circle"
Expand Down Expand Up @@ -1683,7 +1683,7 @@ Array [
>
<div
class="ant-progress-inner"
style="width:30px;height:30px;font-size:10.5px"
style="width:32px;height:32px;font-size:10.8px"
>
<svg
class="ant-progress-circle"
Expand Down Expand Up @@ -1858,7 +1858,7 @@ Array [
>
<div
class="ant-progress-inner"
style="width:38px;height:38px;font-size:11.7px"
style="width:40px;height:40px;font-size:12px"
>
<svg
class="ant-progress-circle"
Expand Down Expand Up @@ -2033,7 +2033,7 @@ Array [
>
<div
class="ant-progress-inner"
style="width:30px;height:30px;font-size:10.5px"
style="width:32px;height:32px;font-size:10.8px"
>
<svg
class="ant-progress-circle"
Expand Down
2 changes: 1 addition & 1 deletion components/steps/index.tsx
Expand Up @@ -67,7 +67,7 @@ export default class Steps extends React.Component<StepsProps, any> {
}) => {
if (status === 'process' && percent !== undefined) {
// currently it's hard-coded, since we can't easily read the actually width of icon
const progressWidth = size === 'small' ? 30 : 38;
const progressWidth = size === 'small' ? 32 : 40;
const iconWithProgress = (
<div className={`${prefixCls}-progress-icon`}>
<Progress
Expand Down
8 changes: 4 additions & 4 deletions components/steps/style/progress.less
Expand Up @@ -11,10 +11,10 @@
position: relative;
.@{progress-prefix-cls} {
position: absolute;
top: -4px;
right: -4px;
bottom: -4px;
left: -4px;
top: -5px;
right: -5px;
bottom: -5px;
left: -5px;
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions components/steps/style/rtl.less
Expand Up @@ -42,13 +42,13 @@
.@{steps-prefix-cls}-horizontal:not(.@{steps-prefix-cls}-label-vertical) {
.@{steps-prefix-cls}-item {
.@{steps-prefix-cls}-rtl& {
margin-right: 0;
margin-left: 16px;
padding-right: 16px;
padding-left: 0;
}

&:last-child {
&:first-child {
.@{steps-prefix-cls}-rtl& {
margin-left: 0;
padding-right: 0;
}
}
&:last-child .@{steps-prefix-cls}-item-title {
Expand Down Expand Up @@ -115,13 +115,13 @@
&.@{steps-prefix-cls}-horizontal:not(.@{steps-prefix-cls}-label-vertical)
.@{steps-prefix-cls}-item {
.@{steps-prefix-cls}-rtl& {
margin-right: 0;
margin-left: 12px;
padding-right: 12px;
padding-left: 0;
}

&:last-child {
&:first-child {
.@{steps-prefix-cls}-rtl& {
margin-left: 0;
padding-right: 0;
}
}
}
Expand Down