Files
t3code/apps/mobile/src/native/SelectableMarkdownText.android.tsx
T

25 lines
865 B
TypeScript

import {
SelectableMarkdownText as T3SelectableMarkdownText,
type SelectableMarkdownTextProps,
} from "@t3tools/mobile-markdown-text/renderer";
import { highlightCodeSnippet } from "../features/review/shikiReviewHighlighter";
type MobileSelectableMarkdownTextProps = Omit<SelectableMarkdownTextProps, "highlightCode">;
export type {
MarkdownImageRequest,
NativeMarkdownTextStyle,
SelectableMarkdownSkill,
} from "@t3tools/mobile-markdown-text/types";
// The renderer falls back to React Native Text outside iOS, so Android can use
// the same Markdown chunking while retaining native text selection.
export function hasNativeSelectableMarkdownText(): boolean {
return true;
}
export function SelectableMarkdownText(props: MobileSelectableMarkdownTextProps) {
return <T3SelectableMarkdownText {...props} highlightCode={highlightCodeSnippet} />;
}