react-native-boxes 1.3.20 → 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 +1 -1
- package/src/Bar.tsx +40 -2
package/package.json
CHANGED
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
|
}
|