Skip to content

Commit

Permalink
fix: Steps progress circle size & rtl style when use progress (#26075)
Browse files Browse the repository at this point in the history
* fix: Steps progress circle size

* test: update snapshot

* fix: rtl
  • Loading branch information
07akioni committed Aug 9, 2020
1 parent d5ca588 commit f964abc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
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

0 comments on commit f964abc

Please sign in to comment.