File tree Expand file tree Collapse file tree 3 files changed +53
-27
lines changed
Expand file tree Collapse file tree 3 files changed +53
-27
lines changed Original file line number Diff line number Diff line change 3434 }
3535
3636 &-icon {
37+ flex : none ;
3738 border : 1px solid @wait-icon-color ;
3839 width : 26px ;
3940 height : 26px ;
9697
9798.@{stepsPrefixClass} -horizontal :not (.@{stepsPrefixClass} -label-vertical ) {
9899 .@{stepsPrefixClass} -item {
99- margin-right : 10px ;
100- & :last-child {
101- margin-right : 0 ;
102- }
103100 &-description {
104101 max-width : @stepDescriptionMaxWidth ;
105102 }
146143
147144.@{stepsPrefixClass} {
148145 .@{stepsPrefixClass} -item {
146+ &-section {
147+ min-width : 0 ;
148+ }
149+
149150 &-header {
150151 display : flex ;
151152 gap : 8px ;
152153 align-items : center ;
153154 }
155+
156+ // Ellipsis
157+ &-title ,
158+ &-subtitle ,
159+ &-description {
160+ overflow : hidden ;
161+ text-overflow : ellipsis ;
162+ white-space : nowrap ;
163+ }
154164 }
155165}
156166
157167.@{stepsPrefixClass} -horizontal {
158168 .@{stepsPrefixClass} -item {
159169 flex : 1 ;
160170 position : relative ;
171+ min-width : 0 ;
161172
162173 &-rail {
163174 height : 1px ;
183194 }
184195 }
185196 }
197+
198+ // Label Horizontal
199+ & .@{stepsPrefixClass} -label-horizontal {
200+ .@{stepsPrefixClass} -item {
201+ display : flex ;
202+
203+ & :last-child {
204+ flex : none ;
205+ }
206+
207+ &-section {
208+ flex : 1 ;
209+ }
210+
211+ &-rail {
212+ flex : 1 ;
213+ min-width : 0 ;
214+ }
215+ }
216+ }
186217}
187218
188219// ======================== Vertical ========================
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ export default function Step(props: StepProps) {
150150 prefixCls = { itemCls }
151151 classNames = { classNames }
152152 styles = { styles }
153- status = { mergedStatus }
153+ status = { nextStatus }
154154 />
155155 ) }
156156 </ div >
Original file line number Diff line number Diff line change 22import cls from 'classnames' ;
33import React from 'react' ;
44import Step from './Step' ;
5- import Rail from './Rail' ;
65
76export type Status = 'error' | 'process' | 'finish' | 'wait' ;
87
@@ -145,27 +144,23 @@ export default function Steps(props: StepsProps) {
145144 } ;
146145
147146 return (
148- < React . Fragment key = { stepIndex } >
149- { /* {index !== 0 && (
150- <Rail prefixCls={prefixCls} classNames={classNames} styles={styles} status={itemStatus} />
151- )} */ }
152- < Step
153- // Style
154- prefixCls = { prefixCls }
155- classNames = { classNames }
156- styles = { styles }
157- // Data
158- data = { data }
159- nextStatus = { nextStatus }
160- active = { stepIndex === current }
161- index = { stepIndex }
162- last = { mergedItems . length - 1 === index }
163- // Render
164- iconRender = { iconRender }
165- itemRender = { itemRender }
166- onClick = { onChange && onStepClick }
167- />
168- </ React . Fragment >
147+ < Step
148+ key = { stepIndex }
149+ // Style
150+ prefixCls = { prefixCls }
151+ classNames = { classNames }
152+ styles = { styles }
153+ // Data
154+ data = { data }
155+ nextStatus = { nextStatus }
156+ active = { stepIndex === current }
157+ index = { stepIndex }
158+ last = { mergedItems . length - 1 === index }
159+ // Render
160+ iconRender = { iconRender }
161+ itemRender = { itemRender }
162+ onClick = { onChange && onStepClick }
163+ />
169164 ) ;
170165 } ;
171166
You can’t perform that action at this time.
0 commit comments