1import { lightTheme } from '@expo/styleguide-native';
2import { Text as RNText, TextInput as RNTextInput } from 'react-native';
3import { create } from 'react-native-primitives';
4
5import { text, textDark } from './theme';
6
7export const Heading = create(RNText, {
8  base: {
9    fontSize: 18,
10    lineHeight: 20,
11    fontWeight: '600',
12    color: lightTheme.text.default,
13  },
14
15  props: {
16    accessibilityRole: 'header',
17  },
18
19  variants: {
20    ...text,
21
22    size: {
23      large: {
24        fontSize: 22,
25        lineHeight: 28,
26      },
27    },
28  },
29
30  selectors: {
31    dark: textDark,
32  },
33});
34
35export const Text = create(RNText, {
36  base: {
37    fontWeight: 'normal',
38    color: lightTheme.text.default,
39    fontSize: 16,
40    lineHeight: 18,
41  },
42
43  props: {
44    accessibilityRole: 'text',
45  },
46
47  variants: {
48    ...text,
49  },
50
51  selectors: {
52    dark: textDark,
53  },
54});
55
56export const TextInput = create(RNTextInput, {
57  base: {
58    fontWeight: 'normal',
59    color: lightTheme.text.default,
60    fontSize: 16,
61    lineHeight: 18,
62  },
63
64  variants: {
65    ...text,
66  },
67
68  selectors: {
69    dark: textDark,
70  },
71});
72