all files / src/explore/components/ AdhocMetricStaticOption.jsx

100% Statements 10/10
50% Branches 1/2
100% Functions 1/1
100% Lines 8/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23                              
import React from 'react';
import PropTypes from 'prop-types';
 
import ColumnTypeLabel from '../../components/ColumnTypeLabel';
import adhocMetricType from '../propTypes/adhocMetricType';
 
const propTypes = {
  adhocMetric: adhocMetricType,
  showType: PropTypes.bool,
};
 
export default function AdhocMetricStaticOption({ adhocMetric, showType }) {
  return (
    <div>
      {showType && <ColumnTypeLabel type="expression" />}
      <span className="m-r-5 option-label">
        {adhocMetric.label}
      </span>
    </div>
  );
}
AdhocMetricStaticOption.propTypes = propTypes;