All files / FormEngine/templates Text.js

50% Statements 3/6
100% Branches 0/0
0% Functions 0/2
50% Lines 3/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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      1x                   1x             1x                
import React from 'react';
import {View, Text as RNText, StyleSheet} from 'react-native';
 
const Text = ({customize: {type, title}}) => {
  const styles = makeStyles(type);
 
  return (
    <View>
      <RNText style={styles.text}>{title}</RNText>
    </View>
  );
};
 
const makeStyles = type =>
  StyleSheet.create({
    text: {
      fontSize: fontSizes[type],
    },
  });
 
const fontSizes = {
  h1: 48,
  h2: 34,
  h3: 24,
  body: 16,
};
 
export default Text;