import React from 'react';
import PropTypes from 'prop-types';

function Title(props) {
    const { text, subtitle } = props;
    return (
        <div className="vtx-modal-header-title">
            <span className="vtx-modal-header-text">{text}</span>
            {subtitle && <span className="vtx-modal-header-subtitle">{subtitle}</span>}
        </div>
    );
}

Title.propTypes = {
    text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
    subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
};

export default Title;
