Home Reference Source

src/views/journal/components/LabelTextInput.js

import React from 'react';
import {StyleSheet, Text} from 'react-native';

/**
 * Component displaying the label of a text input.
 * @param {Object} props - Properties
 * @param {string} props.label - Label
 * @returns {Object} Label of a text input
 */
export default function LabelTextInput(props) {
    // Retrieve props
    const label = props.label;

    return <Text style={styles.label}>{label}</Text>;
}

/** Local styles */
const styles = StyleSheet.create({
    label: {
        fontSize: 15,
        lineHeight: 20,
        marginLeft: 3,
        marginBottom: 5,
    },
});