import React from 'react';
import PropTypes from 'prop-types';

/**
 * A stateless component for Quoted Text. It will display orange line on the left and any content to its right.
 */

const QuotedText = (props) => {

    return (
        <div className="jp-quoted-content">
            <h5>{props.jsonData.heading}</h5>
            <p>{props.jsonData.text}</p>
        </div>
    );
};

export default QuotedText;

QuotedText.propTypes = {
    /** A json object with keys: heading and text */
    jsonData: PropTypes.shape({
        /** Heading of quoted text */
        heading: PropTypes.string,
        /** Text content */
        text: PropTypes.string
    }).isRequired
};


