@momo-kits/step 0.102.3-beta.6 → 0.102.3-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ const StepsHorizontal: FC<StepsProps> = ({
20
20
  }) => {
21
21
  const renderStepItem = (item: Step, index: number) => {
22
22
  const {title, description, error, time} = item;
23
- let typoStyle = getStepTypo(activeIndex, index, error, size);
23
+ let typoStyle = getStepTypo(activeIndex, index, error, size, 'horizontal');
24
24
  const {theme} = useContext(ApplicationContext);
25
25
  let alignItems: FlexAlignType = 'center';
26
26
  let textAlign: TextAlign = 'center';
package/StepsVertical.tsx CHANGED
@@ -18,7 +18,7 @@ const StepsVertical: FC<StepsProps> = ({
18
18
  const {error, description, title, time} = item;
19
19
 
20
20
  const stepStyle = getStepColor(activeIndex, index, error, steps.length);
21
- const typoStyle = getStepTypo(activeIndex, index, error, size);
21
+ const typoStyle = getStepTypo(activeIndex, index, error, size, 'vertical');
22
22
 
23
23
  const {backgroundColor, borderColor} = stepStyle;
24
24
  const lineColor =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/step",
3
- "version": "0.102.3-beta.6",
3
+ "version": "0.102.3-beta.7",
4
4
  "private": false,
5
5
  "main": "index.tsx",
6
6
  "dependencies": {},
package/utils.ts CHANGED
@@ -11,7 +11,8 @@ export const getStepTypo = (
11
11
  activeIndex: number,
12
12
  currentIndex: number,
13
13
  error?: boolean,
14
- size?: 'small' | 'large'
14
+ size?: 'small' | 'large',
15
+ stepType?: 'vertical' | 'horizontal'
15
16
  ) => {
16
17
  const {theme} = useContext(ApplicationContext);
17
18
 
@@ -47,7 +48,12 @@ export const getStepTypo = (
47
48
  }
48
49
 
49
50
  case 'completed': {
50
- title.typography = 'header_xs_semibold';
51
+ if (
52
+ stepType === 'horizontal' ||
53
+ (stepType === 'vertical' && size === 'small')
54
+ ) {
55
+ title.typography = 'description_default_regular';
56
+ } else title.typography = 'body_default_regular';
51
57
  break;
52
58
  }
53
59