department-of-veterans-affairs/vets-website

View on GitHub
src/applications/claims-status/components/ClaimCard/ClaimCard.jsx

Summary

Maintainability
A
50 mins
Test Coverage
import React from 'react';
import { PropTypes } from 'prop-types';

export default function ClaimCard({ title, children, label, subtitle }) {
  return (
    <va-card class="claim-list-item">
      <h3 className="claim-list-item-header vads-u-margin-bottom--2">
        <div>
          {label && <span className="usa-label">{label}</span>}
          {title}
          {subtitle && (
            <span className="vads-u-margin-top--0p5 submitted-on">
              {subtitle}
            </span>
          )}
        </div>
      </h3>
      {children}
    </va-card>
  );
}

ClaimCard.propTypes = {
  title: PropTypes.string.isRequired,
  children: PropTypes.node,
  label: PropTypes.string,
  subtitle: PropTypes.string,
};