react-native-boxes 1.4.23 → 1.4.25

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": "react-native-boxes",
3
- "version": "1.4.23",
3
+ "version": "1.4.25",
4
4
  "description": "A react native library for rapid development of UI using boxes",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/Button.tsx CHANGED
@@ -81,7 +81,7 @@ export function TransparentButton(props: TextProps & TouchableHighlightProps
81
81
  //@ts-ignore
82
82
  fontFamily: tstyle.fontFamily || theme.fonts.Bold,
83
83
  //@ts-ignore
84
- color: isPressed ? (props.underlayColor || theme.colors.accent) : tstyle.color || theme.colors.text,
84
+ color: isPressed ? (props.underlayColor || theme.colors.accentLight) : tstyle.color || theme.colors.accent,
85
85
  }}>
86
86
  {props.text || props.children}
87
87
  </TextView>
package/src/Input.tsx CHANGED
@@ -68,16 +68,7 @@ export function TextInputView(props: TextInputProps & {
68
68
  )
69
69
  }
70
70
 
71
-
72
- /**
73
- * Note: if input is inside a ScrollView in heirarchy anywhere then add keyboardShouldPersistTaps={'handled'}
74
- * to the scrollview else the icon click wont work
75
- * In case, you textinput is getting hidden due to keyboard see https://stackoverflow.com/a/77563800/6865753
76
-
77
- * @param props
78
- * @returns
79
- */
80
- export function CompositeTextInputView(props: TextInputProps & {
71
+ export type CompositeTextInputViewProps = TextInputProps & {
81
72
  hint?: string,
82
73
  alertText?: string,
83
74
  alertTextColor?: string,
@@ -87,7 +78,17 @@ export function CompositeTextInputView(props: TextInputProps & {
87
78
  icon?: 'close' | 'eye' | string | React.Component,
88
79
  onIconPress?: ((event: GestureResponderEvent) => void) | undefined,
89
80
  textInputProps?: TextInputProps,
90
- }) {
81
+ onDone?: (txt: string) => void
82
+ }
83
+ /**
84
+ * Note: if input is inside a ScrollView in heirarchy anywhere then add keyboardShouldPersistTaps={'handled'}
85
+ * to the scrollview else the icon click wont work
86
+ * In case, you textinput is getting hidden due to keyboard see https://stackoverflow.com/a/77563800/6865753
87
+
88
+ * @param props
89
+ * @returns
90
+ */
91
+ export function CompositeTextInputView(props: CompositeTextInputViewProps) {
91
92
  const theme = useContext(ThemeContext)
92
93
  const [text, setText] = useState(props.initialText)
93
94
  const [alerttext, setAlertText] = useState(props.alertText)
@@ -187,6 +188,9 @@ export function CompositeTextInputView(props: TextInputProps & {
187
188
  }}
188
189
  >{props.placeholder || ''}</TextView>}
189
190
  <TextComponent
191
+ onSubmitEditing={(e) => {
192
+ props.onDone && props.onDone(text!)
193
+ }}
190
194
  selectionColor={props.selectionColor || theme.colors.accent}
191
195
  secureTextEntry={props.secureTextEntry}
192
196
  placeholderTextColor={theme.colors.caption}