@chem-po/react-native 0.0.32 → 0.0.33

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
@@ -2,7 +2,7 @@
2
2
  "name": "@chem-po/react-native",
3
3
  "author": "Elan Canfield",
4
4
  "license": "MIT",
5
- "version": "0.0.32",
5
+ "version": "0.0.33",
6
6
  "main": "lib/commonjs/index.js",
7
7
  "types": "lib/typescript/index.d.ts",
8
8
  "source": "src/index.ts",
@@ -52,8 +52,8 @@
52
52
  "react-native-paper-dates": "^0.22.42",
53
53
  "react-native-svg": "15.11.2",
54
54
  "zustand": "^4.3.3",
55
- "@chem-po/core": "0.0.32",
56
- "@chem-po/react": "0.0.32"
55
+ "@chem-po/react": "0.0.33",
56
+ "@chem-po/core": "0.0.33"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/core": "^7.26.0",
@@ -1,9 +1,10 @@
1
- import { useTextColor, useToast } from '@chem-po/react'
1
+ import { useBorderColor, useTextColor, useToast } from '@chem-po/react'
2
2
  import { Ionicons } from '@expo/vector-icons'
3
3
  import React, { ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react'
4
4
  import {
5
5
  ActivityIndicator,
6
6
  Animated,
7
+ StyleProp,
7
8
  StyleSheet,
8
9
  Text,
9
10
  TextStyle,
@@ -15,9 +16,9 @@ import { Pressable } from 'react-native-gesture-handler'
15
16
  export interface LoadingButtonProps {
16
17
  onPress: (() => Promise<any>) | (() => void)
17
18
  children: ReactNode
18
- style?: ViewStyle
19
- contentStyle?: ViewStyle
20
- textStyle?: TextStyle
19
+ style?: StyleProp<ViewStyle>
20
+ contentStyle?: StyleProp<ViewStyle>
21
+ textStyle?: StyleProp<TextStyle>
21
22
  color?: string
22
23
  icon?: {
23
24
  name: React.ComponentProps<typeof Ionicons>['name']
@@ -88,6 +89,7 @@ export const LoadingButton: React.FC<LoadingButtonProps> = ({
88
89
 
89
90
  const fallbackColor = useTextColor()
90
91
  const color = useMemo(() => colorProp ?? fallbackColor, [colorProp, fallbackColor])
92
+ const borderColor = useBorderColor()
91
93
  return (
92
94
  <Pressable
93
95
  style={[
@@ -100,7 +102,11 @@ export const LoadingButton: React.FC<LoadingButtonProps> = ({
100
102
  }}
101
103
  disabled={loading || disabled}>
102
104
  <View
103
- style={[styles.buttonContent, { borderColor: disabled ? '#ccc' : color }, contentStyle]}>
105
+ style={[
106
+ styles.buttonContent,
107
+ { borderColor: disabled ? '#ccc' : borderColor },
108
+ contentStyle,
109
+ ]}>
104
110
  <Animated.View style={[styles.contentContainer, { opacity: contentOpacity }]}>
105
111
  {icon && (
106
112
  <Ionicons name={icon.name} size={icon.size ?? 20} color={disabled ? '#ccc' : color} />
@@ -109,9 +109,7 @@ const ChempoPaperProvider = ({ children, fonts }: PropsWithChildren<{ fonts?: Fo
109
109
  )
110
110
  return <PaperProvider theme={paperTheme}>{children}</PaperProvider>
111
111
  }
112
- export const ChempoNativeProvider = <
113
- BackendAdapter extends BackendAdapterInterface<any, any, any, any, any, any>,
114
- >({
112
+ export const ChempoNativeProvider = <BackendAdapter extends BackendAdapterInterface>({
115
113
  theme: themeProp,
116
114
  initialColorMode,
117
115
  children,