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

SelectableMarkdownText.android.tsx

24 lines865 Bytes

1import {
2 SelectableMarkdownText as T3SelectableMarkdownText,
3 type SelectableMarkdownTextProps,
4} from "@t3tools/mobile-markdown-text/renderer";
5​
6import { highlightCodeSnippet } from "../features/review/shikiReviewHighlighter";
7​
8type MobileSelectableMarkdownTextProps = Omit<SelectableMarkdownTextProps, "highlightCode">;
9​
10export type {
11 MarkdownImageRequest,
12 NativeMarkdownTextStyle,
13 SelectableMarkdownSkill,
14} from "@t3tools/mobile-markdown-text/types";
15​
16// The renderer falls back to React Native Text outside iOS, so Android can use
17// the same Markdown chunking while retaining native text selection.
18export function hasNativeSelectableMarkdownText(): boolean {
19 return true;
21​
22export function SelectableMarkdownText(props: MobileSelectableMarkdownTextProps) {
23 return <T3SelectableMarkdownText {...props} highlightCode={highlightCodeSnippet} />;