all files / src/explore/components/ AggregateOption.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 aggregateOptionType from '../propTypes/aggregateOptionType';
 
const propTypes = {
  aggregate: aggregateOptionType,
  showType: PropTypes.bool,
};
 
export default function AggregateOption({ aggregate, showType }) {
  return (
    <div>
      {showType && <ColumnTypeLabel type="aggregate" />}
      <span className="m-r-5 option-label">
        {aggregate.aggregate_name}
      </span>
    </div>
  );
}
AggregateOption.propTypes = propTypes;