dopry/netlify-cms

View on GitHub
src/components/UnpublishedListing/UnpublishedListingCardMeta.js

Summary

Maintainability
A
0 mins
Test Coverage
import PropTypes from 'prop-types';
import React from 'react';
import styles from './UnpublishedListingCardMeta.css';

const UnpublishedListingCardMeta = ({ meta, label }) =>
  <div className={styles.cardMeta}>
    <span className={styles.meta}>{meta}</span>
    {(label && label.length > 0)
      ? <span className={styles.label}>{label}</span>
      : ""}
  </div>;

UnpublishedListingCardMeta.propTypes = {
  meta: PropTypes.string.isRequired,
  label: PropTypes.string,
};

export default UnpublishedListingCardMeta;