Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

markdownLinkIcons.ts

12 lines490 Bytes

1import type { ImageSourcePropType } from "react-native";
2​
3import type { MarkdownLinkIcon } from "./markdownLinks";
4​
5// Black-on-transparent marks; callers tint them with the link color.
6const MARKDOWN_LINK_ICON_SOURCES = {
7 github: require("../../assets/link-icons/github.png"),
8} as const satisfies Readonly<Record<MarkdownLinkIcon, ImageSourcePropType>>;
9​
10export function markdownLinkIconSource(icon: MarkdownLinkIcon): ImageSourcePropType {
11 return MARKDOWN_LINK_ICON_SOURCES[icon];