Files
superset2/superset/assets/src/explore/components/AdhocMetricStaticOption.jsx
Gabe Lyons a8514b267b [Explore] Adding Adhoc Filters (#4909)
* adding custom expressions to adhoc metrics

* adjusted transitions and made the box expandable

* adding adhoc filters

* adjusted based on feedback
2018-05-10 10:41:10 -07:00

23 lines
580 B
JavaScript

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;