Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

## [3.0.0]

### Removed

- No longer rendering the widgets inside of a SafeAreaView. Users of the widgets need to handle this.

### Updated

- Stopped using the deprecated react-native SafeAreaView in favor of react-native-safe-area-context

## [2.0.3]

### Added
Expand Down
3 changes: 2 additions & 1 deletion example/app/budgets.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react"
import { SafeAreaView, StyleSheet, Platform } from "react-native"
import { StyleSheet, Platform } from "react-native"
import { SafeAreaView } from "react-native-safe-area-context"

import { BudgetsWidget } from "@mxenabled/react-native-widget-sdk"

Expand Down
3 changes: 2 additions & 1 deletion example/app/connect.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react"
import { SafeAreaView, StyleSheet, Platform } from "react-native"
import { StyleSheet, Platform } from "react-native"
import { SafeAreaView } from "react-native-safe-area-context"
import * as Linking from "expo-linking"

import { ConnectWidget } from "@mxenabled/react-native-widget-sdk"
Expand Down
3 changes: 2 additions & 1 deletion example/app/goals.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react"
import { SafeAreaView, StyleSheet, Platform } from "react-native"
import { StyleSheet, Platform } from "react-native"
import { SafeAreaView } from "react-native-safe-area-context"

import { GoalsWidget } from "@mxenabled/react-native-widget-sdk"

Expand Down
3 changes: 2 additions & 1 deletion example/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { FC, PropsWithChildren } from "react"
import { SafeAreaView, Text, View, StyleSheet } from "react-native"
import { Text, View, StyleSheet } from "react-native"
import { SafeAreaView } from "react-native-safe-area-context"
import { Link } from "expo-router"

const styles = StyleSheet.create({
Expand Down
4 changes: 2 additions & 2 deletions example/app/pulse.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import { SafeAreaView, StyleSheet, Platform } from "react-native"

import { StyleSheet, Platform } from "react-native"
import { SafeAreaView } from "react-native-safe-area-context"
import { PulseWidget } from "@mxenabled/react-native-widget-sdk"

const baseUrl = Platform.OS === "android" ? "http://10.0.2.2:8089" : "http://localhost:8089"
Expand Down
4 changes: 2 additions & 2 deletions example/app/spending.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import { SafeAreaView, StyleSheet, Platform } from "react-native"

import { StyleSheet, Platform } from "react-native"
import { SafeAreaView } from "react-native-safe-area-context"
import { SpendingWidget } from "@mxenabled/react-native-widget-sdk"

const baseUrl = Platform.OS === "android" ? "http://10.0.2.2:8089" : "http://localhost:8089"
Expand Down
4 changes: 2 additions & 2 deletions example/app/transactions.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import { SafeAreaView, StyleSheet, Platform } from "react-native"

import { StyleSheet, Platform } from "react-native"
import { SafeAreaView } from "react-native-safe-area-context"
import { TransactionsWidget } from "@mxenabled/react-native-widget-sdk"

const baseUrl = Platform.OS === "android" ? "http://10.0.2.2:8089" : "http://localhost:8089"
Expand Down
2 changes: 1 addition & 1 deletion example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mxenabled/react-native-widget-sdk",
"description": "MX React Native Widget SDK",
"version": "2.0.3",
"version": "3.0.0",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
Expand Down
8 changes: 4 additions & 4 deletions src/components/renderer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useRef, MutableRefObject, ReactElement } from "react"
import { SafeAreaView, StyleProp, ViewStyle } from "react-native"
import { StyleProp, ViewStyle, View } from "react-native"
import { WebView } from "react-native-webview"
import { Payload } from "@mxenabled/widget-post-message-definitions"

Expand Down Expand Up @@ -35,7 +35,7 @@ export function useWidgetRendererWithRef<Configuration>(
const style = props.style || fullscreenStyles

if (!url) {
return [ref, <SafeAreaView style={style} />]
return [ref, <View style={style} />]
}

const scheme = props.uiMessageWebviewUrlScheme || "mx"
Expand All @@ -54,7 +54,7 @@ export function useWidgetRendererWithRef<Configuration>(

return [
ref,
<SafeAreaView testID="widget_view" style={style}>
<View testID="widget_view" style={style}>
<WebView
testID="widget_webview"
style={props.webViewStyle}
Expand All @@ -70,6 +70,6 @@ export function useWidgetRendererWithRef<Configuration>(
onShouldStartLoadWithRequest={handler}
onError={props.onWebViewError}
/>
</SafeAreaView>,
</View>,
]
}