The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import IconGitBranch from "@tabler/icons-react-native/IconGitBranch"; |
| 2 | import IconGitMerge from "@tabler/icons-react-native/IconGitMerge"; |
| 3 | import IconGitCommit from "@tabler/icons-react-native/IconGitCommit"; |
| 4 | import IconGitPullRequestClosed from "@tabler/icons-react-native/IconGitPullRequestClosed"; |
| 5 | import IconGitPullRequestDraft from "@tabler/icons-react-native/IconGitPullRequestDraft"; |
| 6 | import type { SFSymbol } from "expo-symbols"; |
| 7 | import IconCircleDot from "@tabler/icons-react-native/IconCircleDot"; |
| 8 | import IconGitPullRequest from "@tabler/icons-react-native/IconGitPullRequest"; |
| 9 | import IconFileDiff from "@tabler/icons-react-native/IconFileDiff"; |
| 10 | import IconRobot from "@tabler/icons-react-native/IconRobot"; |
| 11 | import { SymbolView as ExpoSymbolView } from "expo-symbols"; |
| 12 | import { withUniwind } from "uniwind"; |
| 13 | import type { AppSymbolViewProps } from "./AppSymbol.android"; |
| 14 | |
| 15 | export type { SFSymbol } from "expo-symbols"; |
| 16 | export type { AppSymbolName, AppSymbolViewProps } from "./AppSymbol.android"; |
| 17 | |
| 18 | const CUSTOM_ICONS = { |
| 19 | "file.diff": IconFileDiff, |
| 20 | "arrow.triangle.pull": IconGitPullRequest, |
| 21 | "arrow.triangle.merge": IconGitMerge, |
| 22 | "arrow.triangle.branch": IconGitBranch, |
| 23 | "arrow.branch": IconGitBranch, |
| 24 | "git.pull-request.closed": IconGitPullRequestClosed, |
| 25 | "git.pull-request.draft": IconGitPullRequestDraft, |
| 26 | "git.commit": IconGitCommit, |
| 27 | "git.issue": IconCircleDot, |
| 28 | robot: IconRobot, |
| 29 | }; |
| 30 | |
| 31 | function AppSymbolView(props: AppSymbolViewProps) { |
| 32 | const name = typeof props.name === "string" ? props.name : props.name.ios; |
| 33 | const CustomIcon = CUSTOM_ICONS[name as keyof typeof CUSTOM_ICONS]; |
| 34 | if (CustomIcon) { |
| 35 | return ( |
| 36 | <CustomIcon |
| 37 | accessibilityLabel={props.accessibilityLabel} |
| 38 | color={props.tintColor} |
| 39 | size={props.size} |
| 40 | strokeWidth={2} |
| 41 | style={props.style} |
| 42 | testID={props.testID} |
| 43 | /> |
| 44 | ); |
| 45 | } |
| 46 | |
| 47 | return <ExpoSymbolView {...props} name={name as SFSymbol} />; |
| 48 | } |
| 49 | |
| 50 | export const SymbolView = withUniwind(AppSymbolView); |