@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

main
tsx 32 lines 863 Bytes
Raw
1 import { SymbolView } from "./ui/AppSymbol";
2 import { Image, type ImageStyle, type StyleProp } from "react-native";
3
4 import { markdownFileIconSource } from "../lib/markdownFileIcons";
5 import { resolveMarkdownFileIcon } from "../lib/markdownLinks";
6
7 export function PierreEntryIcon(props: {
8 readonly path: string;
9 readonly kind: "file" | "directory";
10 readonly size?: number;
11 readonly style?: StyleProp<ImageStyle>;
12 }) {
13 const size = props.size ?? 16;
14 if (props.kind === "directory") {
15 return (
16 <SymbolView
17 name="folder"
18 size={size}
19 tintColorClassName={"accent-icon-subtle"}
20 type="monochrome"
21 />
22 );
23 }
24
25 return (
26 <Image
27 source={markdownFileIconSource(resolveMarkdownFileIcon(props.path))}
28 resizeMode="contain"
29 style={[{ width: size, height: size }, props.style]}
30 />
31 );
32 }