1import { Code } from '@expo/html-elements';
2import React from 'react';
3import { StyleSheet, View, StyleProp, ViewStyle, TextStyle } from 'react-native';
4
5const MonoText: React.FunctionComponent<{
6  containerStyle?: StyleProp<ViewStyle>;
7  textStyle?: StyleProp<TextStyle>;
8}> = ({ children, containerStyle, textStyle }) => (
9  <View style={[styles.container, containerStyle]}>
10    <Code style={[styles.monoText, textStyle]}>{children}</Code>
11  </View>
12);
13
14export default MonoText;
15
16const styles = StyleSheet.create({
17  container: {
18    backgroundColor: '#ffffff',
19    padding: 6,
20    marginVertical: 8,
21    borderWidth: 1,
22    borderColor: '#666666',
23  },
24  monoText: {
25    fontSize: 10,
26  },
27});
28