fix(app): theme pull request empty state
The empty-state text inherited the platform default color, making it unreadable on dark surfaces. Use the app foreground tokens so it follows the active theme.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useCallback, useEffect } from "react";
|
||||
import { Text, View } from "react-native";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { StyleSheet } from "react-native-unistyles";
|
||||
import { buildWorkspaceAttachmentScopeKey } from "@/attachments/workspace-attachments-store";
|
||||
import { useToast } from "@/contexts/toast-context";
|
||||
import { useCheckoutGitActionsStore } from "@/git/actions-store";
|
||||
@@ -75,9 +76,9 @@ export function PullRequestContent(input: {
|
||||
return <PullRequestPaneSkeleton />;
|
||||
}
|
||||
return (
|
||||
<View style={EMPTY_STYLE} testID="pull-request-empty-state">
|
||||
<Text style={EMPTY_TITLE_STYLE}>{t("panels.pullRequest.emptyTitle")}</Text>
|
||||
<Text>{t("panels.pullRequest.emptyDescription")}</Text>
|
||||
<View style={styles.empty} testID="pull-request-empty-state">
|
||||
<Text style={styles.emptyTitle}>{t("panels.pullRequest.emptyTitle")}</Text>
|
||||
<Text style={styles.emptyDescription}>{t("panels.pullRequest.emptyDescription")}</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
@@ -91,12 +92,18 @@ export function usePullRequestData(input: {
|
||||
return usePrPaneData(input);
|
||||
}
|
||||
|
||||
const EMPTY_STYLE = {
|
||||
flex: 1,
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
gap: 8,
|
||||
padding: 24,
|
||||
} as const;
|
||||
|
||||
const EMPTY_TITLE_STYLE = { fontWeight: "600" } as const;
|
||||
const styles = StyleSheet.create((theme) => ({
|
||||
empty: {
|
||||
flex: 1,
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
gap: 8,
|
||||
padding: 24,
|
||||
},
|
||||
emptyTitle: {
|
||||
color: theme.colors.foreground,
|
||||
},
|
||||
emptyDescription: {
|
||||
color: theme.colors.foregroundMuted,
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user