mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
[explore] improve metric(s) and groupby(s) controls (#2921)
* [explore] improve metric(s) and groupby(s) controls - surface verbose_name, description & expression in controls - [table viz] surface verbose name in table header * Fixing tests * Addressing comments * Fixing tests (once more)
This commit is contained in:
committed by
GitHub
parent
34f381bc25
commit
16141ecb94
@@ -6,17 +6,23 @@ import { slugify } from '../modules/utils';
|
||||
const propTypes = {
|
||||
label: PropTypes.string.isRequired,
|
||||
tooltip: PropTypes.string.isRequired,
|
||||
icon: PropTypes.string,
|
||||
className: PropTypes.string,
|
||||
};
|
||||
const defaultProps = {
|
||||
icon: 'question-circle-o',
|
||||
};
|
||||
|
||||
export default function InfoTooltipWithTrigger({ label, tooltip }) {
|
||||
export default function InfoTooltipWithTrigger({ label, tooltip, icon, className }) {
|
||||
return (
|
||||
<OverlayTrigger
|
||||
placement="right"
|
||||
overlay={<Tooltip id={`${slugify(label)}-tooltip`}>{tooltip}</Tooltip>}
|
||||
>
|
||||
<i className="fa fa-question-circle-o" />
|
||||
<i className={`fa fa-${icon} ${className}`} />
|
||||
</OverlayTrigger>
|
||||
);
|
||||
}
|
||||
|
||||
InfoTooltipWithTrigger.propTypes = propTypes;
|
||||
InfoTooltipWithTrigger.defaultProps = defaultProps;
|
||||
|
||||
Reference in New Issue
Block a user