import PropTypes from 'prop-types'; import React from 'react'; import styles from './question.css'; import Input from '../forms/input.jsx'; import enterIcon from './icon--enter.svg'; const QuestionComponent = props => { const { answer, className, question, onChange, onClick, onKeyPress } = props; return (
{question ? (
{question}
) : null}
); }; QuestionComponent.propTypes = { answer: PropTypes.string, className: PropTypes.string, onChange: PropTypes.func.isRequired, onClick: PropTypes.func.isRequired, onKeyPress: PropTypes.func.isRequired, question: PropTypes.string }; export default QuestionComponent;