react-native-boxes 1.3.19 → 1.3.22

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.3.19",
3
+ "version": "1.3.22",
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/Bar.tsx CHANGED
@@ -1,9 +1,9 @@
1
1
  import { useContext } from "react";
2
- import { StatusBar, TextStyle, ViewProps } from "react-native";
2
+ import { StatusBar, TextStyle, View, ViewProps } from "react-native";
3
3
  import { ThemeContext } from "./ThemeContext";
4
4
  import * as React from 'react'
5
5
  import { Center, HBox } from "./Box";
6
- import { TextView } from "./Text";
6
+ import { Caption, TextView } from "./Text";
7
7
  import { Icon, getIcon } from "./Image";
8
8
  import { useSafeAreaInsets } from "react-native-safe-area-context";
9
9
  import { PressableView } from "./Button";
@@ -213,4 +213,42 @@ export function BottomNavBar(props: ViewProps &
213
213
  </HBox>
214
214
  )
215
215
 
216
+ }
217
+
218
+
219
+
220
+ export type DividerProps = ViewProps & {
221
+ text?: string
222
+ }
223
+ export function DividerView(props: DividerProps) {
224
+
225
+ const theme = useContext(ThemeContext)
226
+ return (
227
+ <Center style={{
228
+ marginTop: theme.dimens.space.md,
229
+ marginBottom: theme.dimens.space.md,
230
+ flexDirection: "row",
231
+ width: '100%',
232
+ justifyContent: 'space-between'
233
+ }}
234
+ {...props}
235
+ >
236
+ <View style={{
237
+ backgroundColor: theme.colors.caption,
238
+ width: props?.text ? '40%' : '50%',
239
+ height: 0.1
240
+ }} />
241
+ {
242
+ props?.text &&
243
+ <Caption>
244
+ {props.text}
245
+ </Caption>
246
+ }
247
+ <View style={{
248
+ backgroundColor: theme.colors.caption,
249
+ width: props?.text ? '40%' : '50%',
250
+ height: 0.1
251
+ }} />
252
+ </Center>
253
+ )
216
254
  }
package/src/Box.tsx CHANGED
@@ -82,7 +82,7 @@ export function VPage(props: ViewProps) {
82
82
  * @param param0
83
83
  * @returns
84
84
  */
85
- const KeyboardAvoidingScrollView: React.FC<ScrollViewProps> = (props: ScrollViewProps) => {
85
+ export const KeyboardAvoidingScrollView: React.FC<ScrollViewProps> = (props: ScrollViewProps) => {
86
86
  const theme = useContext(ThemeContext)
87
87
  let insets
88
88
  try {
@@ -111,8 +111,6 @@ const KeyboardAvoidingScrollView: React.FC<ScrollViewProps> = (props: ScrollView
111
111
  )
112
112
  }
113
113
 
114
- export default KeyboardAvoidingScrollView
115
-
116
114
  export function CardView(props: ViewProps) {
117
115
 
118
116
  const theme = useContext(ThemeContext)
package/src/demo.tsx CHANGED
@@ -8,7 +8,7 @@ import { AlertMessage } from './Message';
8
8
  import { BottomSheet, DropDownView } from './Modal';
9
9
  import { Avatar, Icon } from './Image';
10
10
  import { ReactWrapper } from './utils';
11
- import KeyboardAvoidingScrollView, { Box } from './Box';
11
+ import { Box, KeyboardAvoidingScrollView } from './Box';
12
12
  import { DarkColors, LightColors } from './Styles';
13
13
 
14
14
  export interface DemoScreenProps {