@momo-kits/date-picker 0.158.1-beta.2 → 0.159.1-beta.2

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.
@@ -1,7 +1,7 @@
1
1
  import React, { FC, memo, useContext } from 'react';
2
2
  import { Animated } from 'react-native';
3
3
  import styles from './styles';
4
- import { ApplicationContext } from '@momo-kits/foundation';
4
+ import { ApplicationContext, useScaleSize } from '@momo-kits/foundation';
5
5
  import { WheelPickerItemProps } from './types';
6
6
 
7
7
  const WheelPickerItem: FC<WheelPickerItemProps> = ({
@@ -11,6 +11,8 @@ const WheelPickerItem: FC<WheelPickerItemProps> = ({
11
11
  itemSize,
12
12
  }) => {
13
13
  const { theme } = useContext(ApplicationContext);
14
+ const scaledFontSize = useScaleSize(16);
15
+ const scaledLineHeight = useScaleSize(22);
14
16
  const position = Animated.divide(scrollAnimatedValue, itemSize);
15
17
  const distance = Animated.subtract(index, position);
16
18
  const opacity =
@@ -45,8 +47,8 @@ const WheelPickerItem: FC<WheelPickerItemProps> = ({
45
47
  scale,
46
48
  },
47
49
  ],
48
- fontSize: 16,
49
- lineHeight: 22,
50
+ fontSize: scaledFontSize,
51
+ lineHeight: scaledLineHeight,
50
52
  }}
51
53
  >
52
54
  {item}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/date-picker",
3
- "version": "0.158.1-beta.2",
3
+ "version": "0.159.1-beta.2",
4
4
  "private": false,
5
5
  "main": "index.tsx",
6
6
  "peerDependencies": {