department-of-veterans-affairs/vets-website

View on GitHub
src/applications/mhv-medications/components/shared/VaPharmacyText.jsx

Summary

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

const VAPharmacyText = ({ phone = '', isNotClickable = false }) => {
  let dialFragment = '';
  if (phone) {
    dialFragment = (
      <>
        {' '}
        at <va-telephone contact={phone} not-clickable={isNotClickable} />
      </>
    );
  }
  return (
    <>
      your VA pharmacy
      {dialFragment}
    </>
  );
};

VAPharmacyText.propTypes = {
  isNotClickable: PropTypes.bool,
  phone: PropTypes.string,
};

export default VAPharmacyText;