@graineai/inapp-react-native 0.33.1 → 0.33.2
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useContext } from "react";
|
|
2
3
|
import { Image, Modal, Pressable, ScrollView, Text, View, useColorScheme } from "react-native";
|
|
3
|
-
import {
|
|
4
|
+
import { Ctx, useGraineWidget } from "./index.js";
|
|
4
5
|
import { resolveNativeAppearance, resolveWidgetPalette } from "./appearance.js";
|
|
5
6
|
import { widgetSurface } from "../protocol.js";
|
|
6
7
|
function tint(hex, alpha) {
|
|
@@ -57,7 +58,7 @@ function AnsweredLine({ answered, theme, accent, radius, onClear }) {
|
|
|
57
58
|
}
|
|
58
59
|
export function GraineWidget(props) {
|
|
59
60
|
const { widget, answered, submit, dismiss } = useGraineWidget();
|
|
60
|
-
const
|
|
61
|
+
const appearance = useContext(Ctx)?.appearance ?? null;
|
|
61
62
|
const scheme = useColorScheme();
|
|
62
63
|
const dash = resolveNativeAppearance(appearance, { accent: "#318CE7", heading: "" });
|
|
63
64
|
const accent = props.accent ?? dash.accent;
|
package/package.json
CHANGED