diff --git a/apps/playground/app.json b/apps/playground/app.json index f3cdaa4..cee233a 100644 --- a/apps/playground/app.json +++ b/apps/playground/app.json @@ -21,7 +21,7 @@ "image": "./assets/splash.png", "resizeMode": "contain" }, - "userInterfaceStyle": "light", + "userInterfaceStyle": "automatic", "version": "1.0.0", "web": { "favicon": "./assets/favicon.png" diff --git a/apps/playground/src/app.tsx b/apps/playground/src/app.tsx index c96eee3..204ad66 100644 --- a/apps/playground/src/app.tsx +++ b/apps/playground/src/app.tsx @@ -1,5 +1,6 @@ import Formbricks, { logout, + setAppearance, setAttribute, setAttributes, setLanguage, @@ -8,11 +9,20 @@ import Formbricks, { } from "@formbricks/react-native"; import { StatusBar } from "expo-status-bar"; import type { JSX } from "react"; -import { Button, LogBox, StyleSheet, Text, View } from "react-native"; +import { + Appearance, + Button, + LogBox, + StyleSheet, + Text, + useColorScheme, + View, +} from "react-native"; LogBox.ignoreAllLogs(); export default function App(): JSX.Element { + const appTheme = useColorScheme(); if (!process.env.EXPO_PUBLIC_FORMBRICKS_WORKSPACE_ID) { throw new Error("EXPO_PUBLIC_FORMBRICKS_WORKSPACE_ID is required"); } @@ -22,8 +32,15 @@ export default function App(): JSX.Element { } return ( - - Formbricks React Native SDK Demo + + + Formbricks React Native SDK Demo + + +