@bigbinary/neetoui-rn 0.0.220 → 0.0.221

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,3 +1,4 @@
1
+ /* eslint-disable react-native/no-inline-styles */
1
2
  import React, { useEffect, useRef, useState } from "react";
2
3
  import { Animated, TouchableWithoutFeedback } from "react-native";
3
4
  import {
@@ -47,15 +48,15 @@ const TextInput = styled.TextInput`
47
48
  * ```
48
49
  */
49
50
 
50
- export const SearchBar = props => {
51
- const {
52
- placeholder = "Search",
53
- onChangeText = () => {},
54
- onCancel = () => {},
55
- debounceDelay = 1000,
56
- showCancelButton = true,
57
- ...rest
58
- } = props;
51
+ export const SearchBar = ({
52
+ placeholder = "Search",
53
+ onChangeText = () => {},
54
+ onCancel = () => {},
55
+ debounceDelay = 1000,
56
+ showCancelButton = true,
57
+ containerProps,
58
+ searchbarProps,
59
+ }) => {
59
60
  const inputRef = useRef();
60
61
  const [searchText, setSearchText] = useState("");
61
62
  const debouncedSearchTextValue = useDebounce(
@@ -113,7 +114,7 @@ export const SearchBar = props => {
113
114
  borderRadius={8}
114
115
  flexDirection="row"
115
116
  alignItems="center"
116
- {...rest.containerProps}
117
+ {...containerProps}
117
118
  >
118
119
  <Container px={10}>
119
120
  <Icon
@@ -139,7 +140,7 @@ export const SearchBar = props => {
139
140
  color="font.primary"
140
141
  autoCapitalize="none"
141
142
  returnKeyType="search"
142
- {...rest.searchbarProps}
143
+ {...searchbarProps}
143
144
  />
144
145
  </Container>
145
146
  </TouchableWithoutFeedback>
@@ -190,4 +191,5 @@ SearchBar.propTypes = {
190
191
  * option to hide the cancel button. Default is true
191
192
  */
192
193
  showCancelButton: PropTypes.bool,
194
+ containerProps: PropTypes.object,
193
195
  };
@@ -18,7 +18,6 @@ const defaultShadowStyle = {
18
18
  },
19
19
  shadowOpacity: 0.23,
20
20
  shadowRadius: 2.62,
21
-
22
21
  elevation: 4,
23
22
  };
24
23
 
@@ -87,7 +86,6 @@ export const SegmentedTopBar = ({
87
86
  }) => {
88
87
  const translateValue = (width - 4) / routes?.length;
89
88
  const tabTranslateValue = useSharedValue(0);
90
-
91
89
  useEffect(() => {
92
90
  tabTranslateValue.value = withSpring(
93
91
  index * (translateValue * 1),
@@ -113,7 +111,7 @@ export const SegmentedTopBar = ({
113
111
  defaultShadowStyle,
114
112
  StyleSheet.absoluteFill,
115
113
  {
116
- width: width / routes?.length,
114
+ width: (width - 4) / routes?.length,
117
115
  },
118
116
  tabTranslateAnimatedStyles,
119
117
  ]}
@@ -184,14 +182,9 @@ const styles = StyleSheet.create({
184
182
 
185
183
  SegmentedTopBar.propTypes = {
186
184
  /**
187
- * Array of texts for the labels of each Segment/Tab.
185
+ * Navigation routes and additional data.
188
186
  */
189
- tabs: PropTypes.arrayOf(
190
- PropTypes.shape({
191
- name: PropTypes.string,
192
- Component: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
193
- })
194
- ).isRequired,
187
+ state: PropTypes.object,
195
188
  /**
196
189
  * To change the inactive segment container style.
197
190
  */
@@ -209,6 +202,8 @@ SegmentedTopBar.propTypes = {
209
202
  */
210
203
  activeTextStyle: PropTypes.object,
211
204
  height: PropTypes.number,
205
+ navigation: PropTypes.object,
206
+ descriptors: PropTypes.object,
212
207
  };
213
208
 
214
209
  SegmentedTopBar.defaultProps = {
@@ -33,8 +33,13 @@ import { Container, Typography, Touchable } from "@components";
33
33
  *
34
34
  */
35
35
 
36
- export const SocialButton = props => {
37
- const { variant, disabled, labelStyle, isLoading, ...rest } = props;
36
+ export const SocialButton = ({
37
+ variant,
38
+ disabled,
39
+ labelStyle,
40
+ isLoading,
41
+ ...rest
42
+ }) => {
38
43
  const theme = useContext(ThemeContext);
39
44
  const capitalize = str => `${str.charAt(0).toUpperCase()}${str.slice(1)}`;
40
45
 
@@ -93,4 +98,8 @@ SocialButton.propTypes = {
93
98
  * Customize label style of the button
94
99
  */
95
100
  labelStyle: PropTypes.object,
101
+ /**
102
+ * Button loading status
103
+ */
104
+ isLoading: PropTypes.bool,
96
105
  };
@@ -84,4 +84,5 @@ Touchable.propTypes = {
84
84
  ...propTypes.buttonStyle,
85
85
 
86
86
  children: PropTypes.node,
87
+ elevation: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
87
88
  };