react-native-marked 1.6.2 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/commonjs/components/MDImage.js +1 -1
  2. package/dist/commonjs/components/MDImage.js.map +1 -1
  3. package/dist/commonjs/lib/Markdown.js.map +1 -1
  4. package/dist/commonjs/lib/Parser.js +27 -24
  5. package/dist/commonjs/lib/Parser.js.map +1 -1
  6. package/dist/commonjs/lib/Renderer.js.map +1 -1
  7. package/dist/commonjs/theme/colors.js +10 -10
  8. package/dist/commonjs/theme/colors.js.map +1 -1
  9. package/dist/commonjs/theme/spacing.js.map +1 -1
  10. package/dist/commonjs/theme/styles.js +12 -12
  11. package/dist/commonjs/theme/styles.js.map +1 -1
  12. package/dist/commonjs/utils/handlers.js.map +1 -1
  13. package/dist/commonjs/utils/string.js.map +1 -1
  14. package/dist/commonjs/utils/url.js +3 -3
  15. package/dist/commonjs/utils/url.js.map +1 -1
  16. package/dist/module/components/MDImage.js +4 -4
  17. package/dist/module/components/MDImage.js.map +1 -1
  18. package/dist/module/index.js +1 -1
  19. package/dist/module/lib/Markdown.js +5 -5
  20. package/dist/module/lib/Markdown.js.map +1 -1
  21. package/dist/module/lib/Parser.js +29 -26
  22. package/dist/module/lib/Parser.js.map +1 -1
  23. package/dist/module/lib/Renderer.js +8 -8
  24. package/dist/module/lib/Renderer.js.map +1 -1
  25. package/dist/module/theme/colors.js +10 -10
  26. package/dist/module/theme/colors.js.map +1 -1
  27. package/dist/module/theme/spacing.js.map +1 -1
  28. package/dist/module/theme/styles.js +15 -15
  29. package/dist/module/theme/styles.js.map +1 -1
  30. package/dist/module/utils/handlers.js +1 -1
  31. package/dist/module/utils/handlers.js.map +1 -1
  32. package/dist/module/utils/string.js.map +1 -1
  33. package/dist/module/utils/url.js +3 -3
  34. package/dist/module/utils/url.js.map +1 -1
  35. package/dist/typescript/components/MDImage.d.ts +2 -2
  36. package/dist/typescript/components/MDImage.d.ts.map +1 -1
  37. package/dist/typescript/index.d.ts +1 -1
  38. package/dist/typescript/lib/Markdown.d.ts +2 -2
  39. package/dist/typescript/lib/Parser.d.ts +4 -4
  40. package/dist/typescript/lib/Parser.d.ts.map +1 -1
  41. package/dist/typescript/lib/Renderer.d.ts +2 -2
  42. package/dist/typescript/lib/Renderer.d.ts.map +1 -1
  43. package/dist/typescript/lib/types.d.ts +4 -4
  44. package/dist/typescript/lib/types.d.ts.map +1 -1
  45. package/dist/typescript/theme/colors.d.ts +2 -2
  46. package/dist/typescript/theme/spacing.d.ts +1 -1
  47. package/dist/typescript/theme/styles.d.ts +2 -2
  48. package/dist/typescript/theme/styles.d.ts.map +1 -1
  49. package/dist/typescript/theme/types.d.ts +3 -3
  50. package/dist/typescript/theme/types.d.ts.map +1 -1
  51. package/package.json +8 -58
  52. package/src/components/MDImage.tsx +19 -19
  53. package/src/index.ts +1 -1
  54. package/src/lib/Markdown.tsx +40 -40
  55. package/src/lib/Parser.tsx +241 -240
  56. package/src/lib/Renderer.tsx +108 -108
  57. package/src/lib/types.ts +11 -11
  58. package/src/theme/colors.ts +16 -16
  59. package/src/theme/spacing.ts +5 -5
  60. package/src/theme/styles.ts +126 -126
  61. package/src/theme/types.ts +25 -25
  62. package/src/utils/handlers.ts +6 -6
  63. package/src/utils/string.ts +1 -1
  64. package/src/utils/url.ts +14 -14
@@ -1,121 +1,121 @@
1
- import React, { ReactNode } from 'react';
1
+ import React, { ReactNode } from "react";
2
2
  import {
3
- ScrollView,
4
- View,
5
- Text,
6
- TouchableHighlight,
7
- TextStyle,
8
- ViewStyle,
9
- ImageStyle,
10
- } from 'react-native';
11
- import MarkedList from '@jsamr/react-native-li';
12
- import Disc from '@jsamr/counter-style/presets/disc';
13
- import Decimal from '@jsamr/counter-style/presets/decimal';
14
- import MDImage from './../components/MDImage';
15
- import { generateRandomString } from '../utils/string';
16
- import { onLinkPress } from '../utils/handlers';
3
+ ScrollView,
4
+ View,
5
+ Text,
6
+ TouchableHighlight,
7
+ TextStyle,
8
+ ViewStyle,
9
+ ImageStyle,
10
+ } from "react-native";
11
+ import MarkedList from "@jsamr/react-native-li";
12
+ import Disc from "@jsamr/counter-style/presets/disc";
13
+ import Decimal from "@jsamr/counter-style/presets/decimal";
14
+ import MDImage from "./../components/MDImage";
15
+ import { generateRandomString } from "../utils/string";
16
+ import { onLinkPress } from "../utils/handlers";
17
17
 
18
18
  class Renderer {
19
- getTextNode = (children: string | ReactNode[], styles?: TextStyle) => {
20
- return (
21
- <Text key={generateRandomString()} style={styles}>
22
- {children}
23
- </Text>
24
- );
25
- };
19
+ getTextNode = (children: string | ReactNode[], styles?: TextStyle) => {
20
+ return (
21
+ <Text key={generateRandomString()} style={styles}>
22
+ {children}
23
+ </Text>
24
+ );
25
+ };
26
26
 
27
- getTextLinkNode = (
28
- children: string | ReactNode[],
29
- href: string,
30
- styles?: TextStyle
31
- ) => {
32
- return (
33
- <Text
34
- accessibilityRole="link"
35
- accessibilityHint="Opens in a new window"
36
- key={generateRandomString()}
37
- onPress={onLinkPress(href)}
38
- style={styles}
39
- >
40
- {children}
41
- </Text>
42
- );
43
- };
27
+ getTextLinkNode = (
28
+ children: string | ReactNode[],
29
+ href: string,
30
+ styles?: TextStyle,
31
+ ) => {
32
+ return (
33
+ <Text
34
+ accessibilityRole="link"
35
+ accessibilityHint="Opens in a new window"
36
+ key={generateRandomString()}
37
+ onPress={onLinkPress(href)}
38
+ style={styles}
39
+ >
40
+ {children}
41
+ </Text>
42
+ );
43
+ };
44
44
 
45
- getImageLinkNode = (
46
- href: string,
47
- imageUrl: string,
48
- alt?: string,
49
- style?: ImageStyle
50
- ) => {
51
- const imageNode = this.getImageNode(imageUrl, alt, style);
52
- return (
53
- <TouchableHighlight
54
- accessibilityRole="link"
55
- accessibilityHint="Opens in a new window"
56
- onPress={onLinkPress(href)}
57
- key={generateRandomString()}
58
- >
59
- {imageNode}
60
- </TouchableHighlight>
61
- );
62
- };
45
+ getImageLinkNode = (
46
+ href: string,
47
+ imageUrl: string,
48
+ alt?: string,
49
+ style?: ImageStyle,
50
+ ) => {
51
+ const imageNode = this.getImageNode(imageUrl, alt, style);
52
+ return (
53
+ <TouchableHighlight
54
+ accessibilityRole="link"
55
+ accessibilityHint="Opens in a new window"
56
+ onPress={onLinkPress(href)}
57
+ key={generateRandomString()}
58
+ >
59
+ {imageNode}
60
+ </TouchableHighlight>
61
+ );
62
+ };
63
63
 
64
- getViewNode(children: ReactNode[] | null, styles?: ViewStyle) {
65
- return (
66
- <View key={generateRandomString()} style={styles}>
67
- {children}
68
- </View>
69
- );
70
- }
64
+ getViewNode(children: ReactNode[] | null, styles?: ViewStyle) {
65
+ return (
66
+ <View key={generateRandomString()} style={styles}>
67
+ {children}
68
+ </View>
69
+ );
70
+ }
71
71
 
72
- getCodeBlockNode(
73
- text: string,
74
- containerStyle?: ViewStyle,
75
- textStyle?: TextStyle
76
- ) {
77
- return (
78
- <ScrollView
79
- key={generateRandomString()}
80
- contentContainerStyle={containerStyle}
81
- horizontal
82
- >
83
- <Text style={textStyle}>{text}</Text>
84
- </ScrollView>
85
- );
86
- }
72
+ getCodeBlockNode(
73
+ text: string,
74
+ containerStyle?: ViewStyle,
75
+ textStyle?: TextStyle,
76
+ ) {
77
+ return (
78
+ <ScrollView
79
+ key={generateRandomString()}
80
+ contentContainerStyle={containerStyle}
81
+ horizontal={true}
82
+ >
83
+ <Text style={textStyle}>{text}</Text>
84
+ </ScrollView>
85
+ );
86
+ }
87
87
 
88
- getBlockquoteNode(children: ReactNode[], styles?: ViewStyle) {
89
- return (
90
- <View key={generateRandomString()} style={styles}>
91
- {children}
92
- </View>
93
- );
94
- }
88
+ getBlockquoteNode(children: ReactNode[], styles?: ViewStyle) {
89
+ return (
90
+ <View key={generateRandomString()} style={styles}>
91
+ {children}
92
+ </View>
93
+ );
94
+ }
95
95
 
96
- getImageNode(uri: string, alt?: string, style?: ImageStyle) {
97
- return (
98
- <MDImage key={generateRandomString()} uri={uri} alt={alt} style={style} />
99
- );
100
- }
96
+ getImageNode(uri: string, alt?: string, style?: ImageStyle) {
97
+ return (
98
+ <MDImage key={generateRandomString()} uri={uri} alt={alt} style={style} />
99
+ );
100
+ }
101
101
 
102
- getListNode(
103
- ordered: boolean,
104
- li: ReactNode[],
105
- listStyle?: ViewStyle,
106
- textStyle?: TextStyle
107
- ) {
108
- return (
109
- <MarkedList
110
- counterRenderer={ordered ? Decimal : Disc}
111
- markerTextStyle={textStyle}
112
- markerBoxStyle={listStyle}
113
- key={generateRandomString()}
114
- >
115
- {li.map((node) => node)}
116
- </MarkedList>
117
- );
118
- }
102
+ getListNode(
103
+ ordered: boolean,
104
+ li: ReactNode[],
105
+ listStyle?: ViewStyle,
106
+ textStyle?: TextStyle,
107
+ ) {
108
+ return (
109
+ <MarkedList
110
+ counterRenderer={ordered ? Decimal : Disc}
111
+ markerTextStyle={textStyle}
112
+ markerBoxStyle={listStyle}
113
+ key={generateRandomString()}
114
+ >
115
+ {li.map((node) => node)}
116
+ </MarkedList>
117
+ );
118
+ }
119
119
  }
120
120
 
121
121
  export default Renderer;
package/src/lib/types.ts CHANGED
@@ -1,17 +1,17 @@
1
- import type { ReactNode } from 'react';
2
- import type { FlatListProps } from 'react-native';
3
- import type { MarkedStyles, UserTheme } from './../theme/types';
1
+ import type { ReactNode } from "react";
2
+ import type { FlatListProps } from "react-native";
3
+ import type { MarkedStyles, UserTheme } from "./../theme/types";
4
4
 
5
5
  export interface ParserOptions {
6
- styles?: MarkedStyles;
7
- baseUrl?: string;
6
+ styles?: MarkedStyles;
7
+ baseUrl?: string;
8
8
  }
9
9
 
10
10
  export interface MarkdownProps extends ParserOptions {
11
- value: string;
12
- flatListProps?: Omit<
13
- FlatListProps<ReactNode>,
14
- 'data' | 'renderItem' | 'horizontal'
15
- >;
16
- theme?: UserTheme;
11
+ value: string;
12
+ flatListProps?: Omit<
13
+ FlatListProps<ReactNode>,
14
+ "data" | "renderItem" | "horizontal"
15
+ >;
16
+ theme?: UserTheme;
17
17
  }
@@ -1,21 +1,21 @@
1
- export type ColorKeysType = 'background' | 'code' | 'link' | 'text' | 'border';
1
+ export type ColorKeysType = "background" | "code" | "link" | "text" | "border";
2
2
  export type ColorsPropType = Record<ColorKeysType, string>;
3
3
 
4
- const colors: Record<'light' | 'dark', ColorsPropType> = {
5
- light: {
6
- background: '#ffffff',
7
- code: '#f6f8fa',
8
- link: '#58a6ff',
9
- text: '#333333',
10
- border: '#d0d7de',
11
- },
12
- dark: {
13
- background: '#000000',
14
- code: '#161b22',
15
- link: '#58a6ff',
16
- text: '#ffffff',
17
- border: '#30363d',
18
- },
4
+ const colors: Record<"light" | "dark", ColorsPropType> = {
5
+ light: {
6
+ background: "#ffffff",
7
+ code: "#f6f8fa",
8
+ link: "#58a6ff",
9
+ text: "#333333",
10
+ border: "#d0d7de",
11
+ },
12
+ dark: {
13
+ background: "#000000",
14
+ code: "#161b22",
15
+ link: "#58a6ff",
16
+ text: "#ffffff",
17
+ border: "#30363d",
18
+ },
19
19
  };
20
20
 
21
21
  export default colors;
@@ -1,10 +1,10 @@
1
- export type SpacingKeysType = 'xs' | 's' | 'm' | 'l';
1
+ export type SpacingKeysType = "xs" | "s" | "m" | "l";
2
2
 
3
3
  const padding: Record<SpacingKeysType, number> = {
4
- xs: 2,
5
- s: 4,
6
- m: 8,
7
- l: 16,
4
+ xs: 2,
5
+ s: 4,
6
+ m: 8,
7
+ l: 16,
8
8
  };
9
9
 
10
10
  export default padding;
@@ -1,137 +1,137 @@
1
- import { ColorSchemeName, StyleSheet } from 'react-native';
2
- import spacing from './spacing';
3
- import colors, { type ColorsPropType } from './colors';
4
- import type { MarkedStyles, UserTheme } from './types';
1
+ import { ColorSchemeName, StyleSheet } from "react-native";
2
+ import spacing from "./spacing";
3
+ import colors, { type ColorsPropType } from "./colors";
4
+ import type { MarkedStyles, UserTheme } from "./types";
5
5
 
6
6
  const getFontStyles = (mdColors: ColorsPropType) => {
7
- return StyleSheet.create({
8
- regular: {
9
- fontSize: 16,
10
- lineHeight: 24,
11
- color: mdColors.text,
12
- },
13
- heading: {
14
- fontWeight: '500',
15
- color: mdColors.text,
16
- },
17
- });
7
+ return StyleSheet.create({
8
+ regular: {
9
+ fontSize: 16,
10
+ lineHeight: 24,
11
+ color: mdColors.text,
12
+ },
13
+ heading: {
14
+ fontWeight: "500",
15
+ color: mdColors.text,
16
+ },
17
+ });
18
18
  };
19
19
 
20
20
  const getStyles = (
21
- userStyles?: MarkedStyles,
22
- colorScheme?: ColorSchemeName,
23
- userTheme?: UserTheme
21
+ userStyles?: MarkedStyles,
22
+ colorScheme?: ColorSchemeName,
23
+ userTheme?: UserTheme,
24
24
  ): MarkedStyles => {
25
- const mdColors = { ...colors[colorScheme || 'light'], ...userTheme?.colors };
26
- const mdSpacing = { ...spacing, ...userTheme?.spacing };
25
+ const mdColors = { ...colors[colorScheme || "light"], ...userTheme?.colors };
26
+ const mdSpacing = { ...spacing, ...userTheme?.spacing };
27
27
 
28
- const fontStyle = getFontStyles(mdColors);
29
- const defaultStyles = StyleSheet.create<MarkedStyles>({
30
- container: {
31
- backgroundColor: mdColors.background,
32
- },
33
- em: {
34
- ...fontStyle.regular,
35
- fontStyle: 'italic',
36
- },
37
- strong: {
38
- ...fontStyle.regular,
39
- fontWeight: 'bold',
40
- },
41
- strikethrough: {
42
- ...fontStyle.regular,
43
- textDecorationLine: 'line-through',
44
- textDecorationStyle: 'solid',
45
- },
46
- text: {
47
- ...fontStyle.regular,
48
- },
49
- paragraph: {
50
- ...fontStyle.regular,
51
- paddingVertical: mdSpacing.m,
52
- },
53
- link: {
54
- ...fontStyle.regular,
55
- fontStyle: 'italic',
56
- color: mdColors.link,
57
- },
58
- blockquote: {
59
- borderLeftColor: mdColors.border,
60
- paddingLeft: mdSpacing.l,
61
- borderLeftWidth: mdSpacing.s,
62
- opacity: 0.8,
63
- },
64
- h1: {
65
- fontSize: 32,
66
- lineHeight: 40,
67
- fontWeight: 'bold',
68
- marginVertical: mdSpacing.m,
69
- letterSpacing: 0,
70
- paddingBottom: mdSpacing.s,
71
- borderBottomColor: mdColors.border,
72
- borderBottomWidth: 1,
73
- },
74
- h2: {
75
- ...fontStyle.heading,
76
- fontSize: 28,
77
- lineHeight: 36,
78
- marginVertical: mdSpacing.m,
79
- paddingBottom: mdSpacing.s,
80
- borderBottomColor: mdColors.border,
81
- borderBottomWidth: 1,
82
- },
83
- h3: {
84
- ...fontStyle.heading,
85
- fontSize: 24,
86
- lineHeight: 32,
87
- marginVertical: mdSpacing.s,
88
- },
89
- h4: {
90
- ...fontStyle.heading,
91
- fontSize: 22,
92
- lineHeight: 28,
93
- marginVertical: mdSpacing.s,
94
- },
95
- h5: {
96
- ...fontStyle.regular,
97
- ...fontStyle.heading,
98
- marginVertical: mdSpacing.xs,
99
- },
100
- h6: {
101
- ...fontStyle.heading,
102
- fontSize: 14,
103
- lineHeight: 20,
104
- marginVertical: mdSpacing.xs,
105
- },
106
- codespan: {
107
- ...fontStyle.regular,
108
- fontStyle: 'italic',
109
- backgroundColor: mdColors.code,
110
- fontWeight: '300',
111
- },
112
- code: {
113
- padding: mdSpacing.l,
114
- backgroundColor: mdColors.code,
115
- minWidth: '100%',
116
- },
117
- hr: {
118
- borderBottomWidth: 1,
119
- borderBottomColor: mdColors.border,
120
- marginVertical: mdSpacing.s,
121
- },
122
- li: {
123
- ...fontStyle.regular,
124
- flexShrink: 1,
125
- },
126
- image: {
127
- resizeMode: 'cover',
128
- },
129
- });
28
+ const fontStyle = getFontStyles(mdColors);
29
+ const defaultStyles = StyleSheet.create<MarkedStyles>({
30
+ container: {
31
+ backgroundColor: mdColors.background,
32
+ },
33
+ em: {
34
+ ...fontStyle.regular,
35
+ fontStyle: "italic",
36
+ },
37
+ strong: {
38
+ ...fontStyle.regular,
39
+ fontWeight: "bold",
40
+ },
41
+ strikethrough: {
42
+ ...fontStyle.regular,
43
+ textDecorationLine: "line-through",
44
+ textDecorationStyle: "solid",
45
+ },
46
+ text: {
47
+ ...fontStyle.regular,
48
+ },
49
+ paragraph: {
50
+ ...fontStyle.regular,
51
+ paddingVertical: mdSpacing.m,
52
+ },
53
+ link: {
54
+ ...fontStyle.regular,
55
+ fontStyle: "italic",
56
+ color: mdColors.link,
57
+ },
58
+ blockquote: {
59
+ borderLeftColor: mdColors.border,
60
+ paddingLeft: mdSpacing.l,
61
+ borderLeftWidth: mdSpacing.s,
62
+ opacity: 0.8,
63
+ },
64
+ h1: {
65
+ fontSize: 32,
66
+ lineHeight: 40,
67
+ fontWeight: "bold",
68
+ marginVertical: mdSpacing.m,
69
+ letterSpacing: 0,
70
+ paddingBottom: mdSpacing.s,
71
+ borderBottomColor: mdColors.border,
72
+ borderBottomWidth: 1,
73
+ },
74
+ h2: {
75
+ ...fontStyle.heading,
76
+ fontSize: 28,
77
+ lineHeight: 36,
78
+ marginVertical: mdSpacing.m,
79
+ paddingBottom: mdSpacing.s,
80
+ borderBottomColor: mdColors.border,
81
+ borderBottomWidth: 1,
82
+ },
83
+ h3: {
84
+ ...fontStyle.heading,
85
+ fontSize: 24,
86
+ lineHeight: 32,
87
+ marginVertical: mdSpacing.s,
88
+ },
89
+ h4: {
90
+ ...fontStyle.heading,
91
+ fontSize: 22,
92
+ lineHeight: 28,
93
+ marginVertical: mdSpacing.s,
94
+ },
95
+ h5: {
96
+ ...fontStyle.regular,
97
+ ...fontStyle.heading,
98
+ marginVertical: mdSpacing.xs,
99
+ },
100
+ h6: {
101
+ ...fontStyle.heading,
102
+ fontSize: 14,
103
+ lineHeight: 20,
104
+ marginVertical: mdSpacing.xs,
105
+ },
106
+ codespan: {
107
+ ...fontStyle.regular,
108
+ fontStyle: "italic",
109
+ backgroundColor: mdColors.code,
110
+ fontWeight: "300",
111
+ },
112
+ code: {
113
+ padding: mdSpacing.l,
114
+ backgroundColor: mdColors.code,
115
+ minWidth: "100%",
116
+ },
117
+ hr: {
118
+ borderBottomWidth: 1,
119
+ borderBottomColor: mdColors.border,
120
+ marginVertical: mdSpacing.s,
121
+ },
122
+ li: {
123
+ ...fontStyle.regular,
124
+ flexShrink: 1,
125
+ },
126
+ image: {
127
+ resizeMode: "cover",
128
+ },
129
+ });
130
130
 
131
- return {
132
- ...defaultStyles,
133
- ...userStyles,
134
- };
131
+ return {
132
+ ...defaultStyles,
133
+ ...userStyles,
134
+ };
135
135
  };
136
136
 
137
137
  export default getStyles;
@@ -1,31 +1,31 @@
1
- import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';
2
- import type { ColorKeysType } from './colors';
3
- import type { SpacingKeysType } from './spacing';
1
+ import type { ImageStyle, TextStyle, ViewStyle } from "react-native";
2
+ import type { ColorKeysType } from "./colors";
3
+ import type { SpacingKeysType } from "./spacing";
4
4
 
5
5
  export interface MarkedStyles {
6
- container?: ViewStyle;
7
- em?: TextStyle;
8
- strong?: TextStyle;
9
- strikethrough?: TextStyle;
10
- text?: TextStyle;
11
- paragraph?: ViewStyle;
12
- link?: TextStyle;
13
- blockquote?: ViewStyle;
14
- h1?: TextStyle;
15
- h2?: TextStyle;
16
- h3?: TextStyle;
17
- h4?: TextStyle;
18
- h5?: TextStyle;
19
- h6?: TextStyle;
20
- codespan?: TextStyle;
21
- code?: ViewStyle;
22
- hr?: ViewStyle;
23
- list?: ViewStyle;
24
- li?: TextStyle;
25
- image?: ImageStyle;
6
+ container?: ViewStyle;
7
+ em?: TextStyle;
8
+ strong?: TextStyle;
9
+ strikethrough?: TextStyle;
10
+ text?: TextStyle;
11
+ paragraph?: ViewStyle;
12
+ link?: TextStyle;
13
+ blockquote?: ViewStyle;
14
+ h1?: TextStyle;
15
+ h2?: TextStyle;
16
+ h3?: TextStyle;
17
+ h4?: TextStyle;
18
+ h5?: TextStyle;
19
+ h6?: TextStyle;
20
+ codespan?: TextStyle;
21
+ code?: ViewStyle;
22
+ hr?: ViewStyle;
23
+ list?: ViewStyle;
24
+ li?: TextStyle;
25
+ image?: ImageStyle;
26
26
  }
27
27
 
28
28
  export interface UserTheme {
29
- colors?: Record<ColorKeysType, string>;
30
- spacing?: Record<SpacingKeysType, number>;
29
+ colors?: Record<ColorKeysType, string>;
30
+ spacing?: Record<SpacingKeysType, number>;
31
31
  }
@@ -1,9 +1,9 @@
1
- import { Linking } from 'react-native';
1
+ import { Linking } from "react-native";
2
2
 
3
3
  export const onLinkPress = (url: string) => () => {
4
- Linking.openURL(url)
5
- .then(() => null)
6
- .catch((e) => {
7
- console.warn("URL can't be opened", e);
8
- });
4
+ Linking.openURL(url)
5
+ .then(() => null)
6
+ .catch((e) => {
7
+ console.warn("URL can't be opened", e);
8
+ });
9
9
  };
@@ -3,5 +3,5 @@
3
3
  * @returns string
4
4
  */
5
5
  export const generateRandomString = () => {
6
- return Math.random().toString(36).substring(7);
6
+ return Math.random().toString(36).substring(7);
7
7
  };