mirror of
https://github.com/apache/superset.git
synced 2026-04-21 17:14:57 +00:00
[New Viz] Partition Diagram (#3642)
* Added Partition Visualization * added unit tests
This commit is contained in:
committed by
Maxime Beauchemin
parent
48e28eff9b
commit
bad6938d1a
28
superset/assets/javascripts/components/OptionDescription.jsx
Normal file
28
superset/assets/javascripts/components/OptionDescription.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import InfoTooltipWithTrigger from './InfoTooltipWithTrigger';
|
||||
|
||||
const propTypes = {
|
||||
option: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
// This component provides a general tooltip for options
|
||||
// in a SelectControl
|
||||
export default function OptionDescription({ option }) {
|
||||
return (
|
||||
<span>
|
||||
<span className="m-r-5 option-label">
|
||||
{option.label}
|
||||
</span>
|
||||
{option.description &&
|
||||
<InfoTooltipWithTrigger
|
||||
className="m-r-5 text-muted"
|
||||
icon="question-circle-o"
|
||||
tooltip={option.description}
|
||||
label={`descr-${option.label}`}
|
||||
/>
|
||||
}
|
||||
</span>);
|
||||
}
|
||||
OptionDescription.propTypes = propTypes;
|
||||
Reference in New Issue
Block a user