This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
forked from TitanInvest/react-native-easy-markdown
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
58 lines (55 loc) · 2.13 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
declare module 'react-native-easy-markdown' {
import React from 'react';
import { StyleProp, TextStyle, ViewProps, ViewStyle } from 'react-native';
export enum TextType {
h1 = 'h1',
h2 = 'h2',
h3 = 'h3',
h4 = 'h4',
h5 = 'h5',
h6 = 'h6',
strong = 'strong',
del = 'del',
em = 'em',
u = 'u',
};
interface IProps {
debug?: boolean;
parseInline?: boolean;
useDefaultStyles?: boolean;
renderImage?: (src: string, alt: string, title: string, key: string) => React.ReactNode;
renderLink?: (href: string, title: string, children: React.ReactNode, key: string, extraThing: boolean) => React.ReactNode;
renderListBullet?: (ordered: boolean, index: number) => React.ReactNode;
renderLine?: (key: string) => React.ReactNode;
renderText?: (children: React.ReactNode, key: string, extras: { styles: StyleProp<TextStyle> }, textType: TextType) => React.ReactNode;
renderBlockQuote?: (children: React.ReactNode, key: string) => React.ReactNode;
renderBlockText?: (children: React.ReactNode, key: string) => React.ReactNode;
renderBlock?: (children: React.ReactNode, key: string) => React.ReactNode;
markdownStyles?: {
block?: StyleProp<ViewStyle>;
blockQuote?: StyleProp<TextStyle>;
del?: StyleProp<TextStyle>;
em?: StyleProp<TextStyle>;
h1?: StyleProp<TextStyle>;
h2?: StyleProp<TextStyle>;
h3?: StyleProp<TextStyle>;
h4?: StyleProp<TextStyle>;
h5?: StyleProp<TextStyle>;
h6?: StyleProp<TextStyle>;
hr?: StyleProp<TextStyle>;
image?: StyleProp<TextStyle>;
imageWrapper?: StyleProp<ViewStyle>;
link?: StyleProp<TextStyle>;
linkWrapper?: StyleProp<TextStyle>;
list?: StyleProp<TextStyle>;
listItem?: StyleProp<TextStyle>;
listItemBullet?: StyleProp<TextStyle>;
listItemContent?: StyleProp<TextStyle>;
listItemNumber?: StyleProp<TextStyle>;
strong?: StyleProp<TextStyle>;
text?: StyleProp<TextStyle>;
u?: StyleProp<TextStyle>;
};
};
export default class Markdown extends React.Component<IProps & ViewProps> {}
}