Open History to see the last commit
1import IconGitBranch from "@tabler/icons-react-native/IconGitBranch";
2import IconGitMerge from "@tabler/icons-react-native/IconGitMerge";
3import IconGitCommit from "@tabler/icons-react-native/IconGitCommit";
4import IconGitPullRequestClosed from "@tabler/icons-react-native/IconGitPullRequestClosed";
5import IconGitPullRequestDraft from "@tabler/icons-react-native/IconGitPullRequestDraft";
6import type { SFSymbol } from "expo-symbols";
7import IconGitPullRequest from "@tabler/icons-react-native/IconGitPullRequest";
8import IconFileDiff from "@tabler/icons-react-native/IconFileDiff";
9import IconRobot from "@tabler/icons-react-native/IconRobot";
10import { SymbolView as ExpoSymbolView } from "expo-symbols";
11import { withUniwind } from "uniwind";
12import type { AppSymbolViewProps } from "./AppSymbol.android";
13
14export type { SFSymbol } from "expo-symbols";
15export type { AppSymbolName, AppSymbolViewProps } from "./AppSymbol.android";
16
17const CUSTOM_ICONS = {
18 "file.diff": IconFileDiff,
19 "arrow.triangle.pull": IconGitPullRequest,
20 "arrow.triangle.merge": IconGitMerge,
21 "arrow.triangle.branch": IconGitBranch,
22 "arrow.branch": IconGitBranch,
23 "git.pull-request.closed": IconGitPullRequestClosed,
24 "git.pull-request.draft": IconGitPullRequestDraft,
25 "git.commit": IconGitCommit,
26 robot: IconRobot,
27};
28
29function AppSymbolView(props: AppSymbolViewProps) {
30 const name = typeof props.name === "string" ? props.name : props.name.ios;
31 const CustomIcon = CUSTOM_ICONS[name as keyof typeof CUSTOM_ICONS];
32 if (CustomIcon) {
33 return (
34 <CustomIcon
35 accessibilityLabel={props.accessibilityLabel}
36 color={props.tintColor}
37 size={props.size}
38 strokeWidth={2}
39 style={props.style}
40 testID={props.testID}
41 />
42 );
43 }
44
45 return <ExpoSymbolView {...props} name={name as SFSymbol} />;
46}
47
48export const SymbolView = withUniwind(AppSymbolView);