react-native-boxes 1.4.68 → 1.4.70
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 +5 -4
- package/src/Button.tsx +2 -4
package/package.json
CHANGED
package/src/Bar.tsx
CHANGED
|
@@ -202,16 +202,17 @@ export function BottomNavBar(props: ViewProps &
|
|
|
202
202
|
}}
|
|
203
203
|
{...props}
|
|
204
204
|
style={[{
|
|
205
|
+
width: isDesktop() ? '50%' : '100%',
|
|
206
|
+
position: 'absolute',
|
|
207
|
+
bottom: 0,
|
|
208
|
+
left: isDesktop() ? '25%' : 0,
|
|
209
|
+
right: isDesktop() ? '25%' : 0,
|
|
205
210
|
flex: 1,
|
|
206
211
|
margin: 0,
|
|
207
212
|
marginBottom: theme?.insets?.bottom || 0,
|
|
208
213
|
backgroundColor: theme.colors.forground,
|
|
209
214
|
zIndex: 100,
|
|
210
|
-
width: '100%',
|
|
211
215
|
justifyContent: 'space-around',
|
|
212
|
-
left: 0,
|
|
213
|
-
bottom: 0,
|
|
214
|
-
position: 'absolute'
|
|
215
216
|
}, props.style]}
|
|
216
217
|
>
|
|
217
218
|
{
|
package/src/Button.tsx
CHANGED
|
@@ -323,7 +323,7 @@ export function PressableView(props: PressableProps) {
|
|
|
323
323
|
return (<Pressable {...props} style={({ pressed }) => [{ opacity: pressed ? 0.7 : 1.0 }, props.style]} />)
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
export function SwitchView(props: SwitchProps & { text?: string, orientation?: "row" | "column" | "row-reverse" | "column-reverse" | undefined }) {
|
|
326
|
+
export function SwitchView(props: SwitchProps & { text?: string, orientation?: "row" | "column" | "row-reverse" | "column-reverse" | undefined, textStyle?: TextStyle }) {
|
|
327
327
|
const theme = useContext(ThemeContext)
|
|
328
328
|
return (
|
|
329
329
|
<HBox style={[{
|
|
@@ -346,9 +346,7 @@ export function SwitchView(props: SwitchProps & { text?: string, orientation?: "
|
|
|
346
346
|
/>
|
|
347
347
|
{
|
|
348
348
|
props.text && (
|
|
349
|
-
<TextView style={{
|
|
350
|
-
paddingStart: theme.dimens.space.md
|
|
351
|
-
}}>{props.text}</TextView>
|
|
349
|
+
<TextView style={props.textStyle}>{props.text}</TextView>
|
|
352
350
|
)
|
|
353
351
|
}
|
|
354
352
|
</HBox>
|