Codeminer42/cm42-central

View on GitHub
app/assets/javascripts/components/stories/History/HistoryHeader.jsx

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react';
import PropTypes from 'prop-types';

const HistoryHeader = ({ title, date, user }) => (
  <div className="HistoryHeader">
    <div className="HistoryHeader__title" data-id="history-header-title">
      {user} <b> {title} </b>
    </div>
    <div className="HistoryHeader__date" data-id="history-header-date">
      {I18n.l('date.formats.short', date)}
    </div>
  </div>
);

HistoryHeader.propTypes = {
  title: PropTypes.string.isRequired,
  date: PropTypes.string.isRequired,
  user: PropTypes.string.isRequired,
};

export default HistoryHeader;