Skip to content

Commit 2815305

Browse files
committed
chore: clean up
1 parent 88aca10 commit 2815305

File tree

2 files changed

+3
-30
lines changed

2 files changed

+3
-30
lines changed

src/Steps.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export interface StepsProps {
5555

5656
// layout
5757
orientation?: 'horizontal' | 'vertical';
58-
titlePlacement?: 'horizontal' | 'vertical' | 'horizontal-alternate';
58+
titlePlacement?: 'horizontal' | 'vertical';
5959

6060
// data
6161
status?: Status;
@@ -102,17 +102,8 @@ export default function Steps(props: StepsProps) {
102102
// ============================= layout =============================
103103
const isVertical = orientation === 'vertical';
104104
const mergedOrientation = isVertical ? 'vertical' : 'horizontal';
105-
const mergeTitlePlacement = React.useMemo(() => {
106-
if (isVertical) {
107-
return titlePlacement === 'horizontal' || titlePlacement === 'horizontal-alternate'
108-
? titlePlacement
109-
: 'horizontal';
110-
}
111-
112-
return titlePlacement === 'vertical' || titlePlacement === 'horizontal'
113-
? titlePlacement
114-
: 'horizontal';
115-
}, [isVertical, titlePlacement]);
105+
const mergeTitlePlacement =
106+
!isVertical && titlePlacement === 'vertical' ? 'vertical' : 'horizontal';
116107

117108
// ============================= styles =============================
118109
const classString = cls(

tests/alternate.test.tsx

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)