@codeleap/mobile 3.2.15 → 3.2.16

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeleap/mobile",
3
- "version": "3.2.15",
3
+ "version": "3.2.16",
4
4
  "main": "src/index.ts",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -10,6 +10,7 @@ import {
10
10
  import { Animated, Platform, StyleSheet, Text as NativeText, TextProps as RNTextProps } from 'react-native'
11
11
  import { usePressableFeedback } from '../../utils'
12
12
  import { TextPresets } from './styles'
13
+ import { ComponentWithDefaultProps } from '../../types'
13
14
 
14
15
  export * from './styles'
15
16
 
@@ -24,7 +25,10 @@ export type TextProps = RNTextProps & {
24
25
  }
25
26
 
26
27
  const _Text = forwardRef<NativeText, TextProps>((textProps, ref) => {
27
- const { variants = [], text, children, onPress, style, debounce = 1000, pressDisabled, ...props } = textProps
28
+ const { variants = [], text, children, onPress, style, debounce = 1000, pressDisabled, ...props } = {
29
+ ...Text.defaultProps,
30
+ ...textProps,
31
+ }
28
32
 
29
33
  const pressPolyfillEnabled = Platform.OS === 'android' && !!onPress && !pressDisabled
30
34
 
@@ -96,7 +100,10 @@ const _Text = forwardRef<NativeText, TextProps>((textProps, ref) => {
96
100
 
97
101
  })
98
102
 
99
- export const Text = _Text as (props: TextProps & {ref?: React.MutableRefObject<NativeText> }) => JSX.Element
103
+ export const Text = _Text as ComponentWithDefaultProps<TextProps & {ref?: React.MutableRefObject<NativeText> }>
104
+
105
+ Text.defaultProps = {
106
+ }
100
107
 
101
108
  export const AnimatedText = Animated.createAnimatedComponent(Text)
102
109