All files / packages/design-system/ui/shared/empty-link index.jsx

75% Statements 3/4
100% Branches 0/0
50% Functions 1/2
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18          2x 4x         2x            
import React from 'react';
import PropTypes from 'prop-types';
 
// Prevents React warning about javascript:void(0) usage
// https://github.com/facebook/react/pull/15047
const EmptyLink = ({ children, title }) => (
  <a href="#" onClick={e => e.preventDefault()} title={title}>
    {children}
  </a>
);
 
EmptyLink.propTypes = {
  children: PropTypes.string,
  title: PropTypes.string
};
 
export default EmptyLink;