import React from 'react';
import {Text,StyleSheet} from 'react-native';
import PropTypes from "prop-types";

const TitleWSubtitle = (props) => {
    return (
        <Text style={[styles.title, props.titleStyle]}> {props.title}
            <Text style={[styles.subtitle, props.subtitleStyle]}>   {props.subtitle}</Text>
        </Text>
    )
};

const styles = StyleSheet.create({
    title: {fontWeight: 'bold', paddingHorizontal: 2, color: 'black'},
    subtitle: {fontWeight: 'normal', fontSize: 10}

});

TitleWSubtitle.propTypes = {
    title: PropTypes.oneOfType(
        [PropTypes.string,PropTypes.number]).isRequired,
    subtitle: PropTypes.oneOfType(
        [PropTypes.string,PropTypes.number]).isRequired,
    titleStyle: PropTypes.object,
    subtitleStyle: PropTypes.object
};


export default TitleWSubtitle;


