@momo-kits/step 0.169.16-beta.7 → 0.169.17-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.
@@ -6,10 +6,10 @@ import {
6
6
  } from '@momo-kits/foundation';
7
7
  import React, { FC, useContext, useState } from 'react';
8
8
  import {
9
+ FlexAlignType,
9
10
  LayoutChangeEvent,
10
11
  TouchableOpacity,
11
12
  View,
12
- ViewStyle,
13
13
  } from 'react-native';
14
14
  import StepIcon from './StepIcon';
15
15
  import styles from './styles';
@@ -39,7 +39,7 @@ const StepsHorizontal: FC<StepsProps> = ({
39
39
  const renderStepItem = (item: Step, index: number) => {
40
40
  const { title, description, error, time } = item;
41
41
  let typoStyle = GetStepTypo(activeIndex, index, error, size, 'horizontal');
42
- let alignItems: NonNullable<ViewStyle['alignItems']> = 'center';
42
+ let alignItems: FlexAlignType = 'center';
43
43
  let textAlign: TextAlign = 'center';
44
44
 
45
45
  if (align === 'left') {
@@ -84,6 +84,7 @@ const StepsHorizontal: FC<StepsProps> = ({
84
84
  <View
85
85
  style={[
86
86
  styles.timeContainer,
87
+ styles.fullWidth,
87
88
  {
88
89
  minHeight: timeHeight,
89
90
  },
@@ -106,7 +107,7 @@ const StepsHorizontal: FC<StepsProps> = ({
106
107
  {renderStepIcon(item, index, align, disabled)}
107
108
  {!!title && (
108
109
  <Text
109
- style={[styles.title, { textAlign }]}
110
+ style={[styles.title, styles.fullWidth, { textAlign }]}
110
111
  color={disabled ? theme.colors.text.disable : typoStyle.title.color}
111
112
  typography={typoStyle.title.typography}
112
113
  accessibilityLabel={`${accessibilityLabel}-title-${index}`}
@@ -116,7 +117,7 @@ const StepsHorizontal: FC<StepsProps> = ({
116
117
  )}
117
118
  {!!description && (
118
119
  <Text
119
- style={{ textAlign }}
120
+ style={[styles.fullWidth, { textAlign }]}
120
121
  color={
121
122
  disabled ? theme.colors.text.disable : typoStyle.description.color
122
123
  }
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@momo-kits/step",
3
- "version": "0.169.16-beta.7",
3
+ "version": "0.169.17-beta.7",
4
4
  "private": false,
5
- "license": "MoMo",
6
5
  "main": "index.tsx",
7
- "publishConfig": {
8
- "registry": "https://registry.npmjs.org/"
9
- },
10
- "dependencies": {},
11
6
  "peerDependencies": {
12
7
  "@momo-kits/foundation": "latest",
13
8
  "react": "*",
14
9
  "react-native": "*"
15
- }
10
+ },
11
+ "license": "MoMo",
12
+ "publishConfig": {
13
+ "registry": "https://registry.npmjs.org/"
14
+ },
15
+ "dependencies": {}
16
16
  }
package/utils.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ApplicationContext, Colors, Typography } from '@momo-kits/foundation';
2
- import { Step } from './types';
2
+ import { Step } from '@momo-kits/step';
3
3
  import { useContext } from 'react';
4
4
 
5
5
  /** Hex alpha (20%) appended to the primary color for a passed connector line. */