@momo-kits/step 0.153.2 → 0.154.1-beta.0

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.
Files changed (3) hide show
  1. package/StepIcon.tsx +15 -4
  2. package/package.json +1 -1
  3. package/styles.ts +1 -15
package/StepIcon.tsx CHANGED
@@ -1,6 +1,6 @@
1
- import {Colors, Icon, Text} from '@momo-kits/foundation';
1
+ import {Colors, Icon, Text, useScaleSize, Radius} from '@momo-kits/foundation';
2
2
  import React, {FC} from 'react';
3
- import {View} from 'react-native';
3
+ import {StyleProp, View, ViewStyle} from 'react-native';
4
4
  import styles from './styles';
5
5
  import {StepIconProps} from './types';
6
6
 
@@ -15,12 +15,23 @@ const StepIcon: FC<StepIconProps> = ({
15
15
  isActive,
16
16
  customIcon,
17
17
  }) => {
18
- let iconStyle = styles.stepIcon;
18
+ const scaledSize = useScaleSize(16);
19
+ const scaledRadiusM = useScaleSize(Radius.M);
20
+
21
+ let iconStyle: StyleProp<ViewStyle> = styles.stepIcon;
19
22
  let checkIconSize = 16;
20
23
  let contentIconSize = 8;
21
24
 
22
25
  if (size === 'small') {
23
- iconStyle = styles.stepIconSmall;
26
+ iconStyle = [
27
+ styles.stepIcon,
28
+ {
29
+ width: scaledSize,
30
+ height: scaledSize,
31
+ borderWidth: 2,
32
+ borderRadius: scaledRadiusM,
33
+ },
34
+ ];
24
35
  checkIconSize = 12;
25
36
  contentIconSize = 6;
26
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/step",
3
- "version": "0.153.2",
3
+ "version": "0.154.1-beta.0",
4
4
  "private": false,
5
5
  "main": "index.tsx",
6
6
  "peerDependencies": {
package/styles.ts CHANGED
@@ -1,4 +1,4 @@
1
- import {Radius, scaleSize, Spacing} from '@momo-kits/foundation';
1
+ import {Radius, Spacing} from '@momo-kits/foundation';
2
2
  import {StyleSheet} from 'react-native';
3
3
  export default StyleSheet.create({
4
4
  stepIcon: {
@@ -7,12 +7,6 @@ export default StyleSheet.create({
7
7
  borderWidth: 2,
8
8
  borderRadius: Radius.L,
9
9
  },
10
- stepIconSmall: {
11
- width: scaleSize(16),
12
- height: scaleSize(16),
13
- borderWidth: 2,
14
- borderRadius: scaleSize(Radius.M),
15
- },
16
10
  lineHorizontal: {
17
11
  height: 2,
18
12
  flex: 1,
@@ -44,14 +38,6 @@ export default StyleSheet.create({
44
38
  textCenter: {
45
39
  textAlign: 'center',
46
40
  },
47
- largeText: {
48
- fontSize: scaleSize(12),
49
- lineHeight: scaleSize(16),
50
- },
51
- smallText: {
52
- fontSize: scaleSize(8),
53
- lineHeight: scaleSize(12),
54
- },
55
41
  currIcon: {
56
42
  backgroundColor: 'white',
57
43
  borderRadius: Radius.L,