@codeleap/mobile 1.9.17 → 1.9.18

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": "1.9.17",
3
+ "version": "1.9.18",
4
4
  "main": "src/index.ts",
5
5
  "author": "Paulo Henrique De Souza <paulosouza300272@gmail.com>",
6
6
  "license": "UNLICENSED",
@@ -41,12 +41,15 @@ export const Touchable: React.FC<TouchableProps> = forwardRef<
41
41
  variants,
42
42
  })
43
43
 
44
- const { logger } = useCodeleapContext()
44
+ const { logger: contextLogger } = useCodeleapContext()
45
45
  const press = () => {
46
46
  if (!onPress) { throw { message: 'No onPress passed to touchable', touchableProps } }
47
- logger.log(
47
+
48
+ const activeLogger = logger || contextLogger
49
+
50
+ activeLogger.log(
48
51
  `<${debugComponent || 'Touchable'}/> pressed`,
49
- { debugName, style, variants },
52
+ debugName || variants,
50
53
  'User interaction',
51
54
  )
52
55
  onPress && onPress()