react-native-boxes 1.4.22 → 1.4.23

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/List.tsx +9 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-boxes",
3
- "version": "1.4.22",
3
+ "version": "1.4.23",
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/List.tsx CHANGED
@@ -2,7 +2,7 @@ import { ActivityIndicator, Text, View, ViewProps } from "react-native"
2
2
  import { Box, CardView, Center, HBox, VBox } from "./Box"
3
3
  import { getIcon } from "./Image"
4
4
  import { Icon } from "@expo/vector-icons/build/createIconSet"
5
- import { Caption, Subtitle, TextView } from "./Text"
5
+ import { Caption, Subtitle, TextView, TitleText } from "./Text"
6
6
  import { useContext } from "react"
7
7
  import { ThemeContext } from "./ThemeContext"
8
8
  import { PressableView } from "./Button"
@@ -49,10 +49,12 @@ export type SimpleDatatableViewItemProps = {
49
49
  onPress?: () => void,
50
50
  flexRatio?: [number, number, number]
51
51
  }
52
+
53
+
52
54
  export function SimpleDatatlistViewItem(props: SimpleDatatableViewItemProps & ViewProps) {
53
- const RightIcon = getIcon(props.icon, true)
55
+ const Icon = getIcon(props.icon, true)
54
56
  const theme = useContext(ThemeContext)
55
- let flexRatio = props.flexRatio || [1, 8, 1]
57
+ let flexRatio = props.flexRatio || [1.5, 7.5, 1]
56
58
  let [left, middle, right] = flexRatio
57
59
  const ttl = left + right + middle
58
60
  const percentages = {
@@ -80,7 +82,7 @@ export function SimpleDatatlistViewItem(props: SimpleDatatableViewItemProps & Vi
80
82
  width: `${percentages.left}%`,
81
83
  maxWidth: 30
82
84
  }}>
83
- {RightIcon && <RightIcon style={{
85
+ {Icon && <Icon style={{
84
86
  padding: theme.dimens.space.md,
85
87
  paddingStart: 0,
86
88
  }} />}
@@ -95,14 +97,14 @@ export function SimpleDatatlistViewItem(props: SimpleDatatableViewItemProps & Vi
95
97
  justifyContent: 'flex-start',
96
98
  alignContent: 'flex-start',
97
99
  }}>
98
- {props.title && (<Subtitle style={{
100
+ {props.title && (<TitleText style={{
99
101
  marginBottom: 0,
100
102
  paddingBottom: 0,
101
- }}>{props.title}</Subtitle>)}
103
+ padding: 0,
104
+ }}>{props.title}</TitleText>)}
102
105
  {props.subtitle && (<TextView style={{
103
106
  marginTop: 0,
104
107
  padding: 0,
105
- paddingTop: theme.dimens.space.sm,
106
108
  }}>{props.subtitle}</TextView>)}
107
109
  {props.body && (<Caption style={{
108
110
  margin: 0,