mirror of
https://github.com/apache/superset.git
synced 2026-04-14 13:44:46 +00:00
[explore] DatasourceControl to pick datasource in modal (#3210)
* [explore] DatasourceControl to pick datasource in modal Makes it easier to change datasource, also makes it such that the list of all datasources doesn't need to be loaded upfront. * Adding more metadata
This commit is contained in:
committed by
GitHub
parent
48821b5101
commit
62fcdf2a92
@@ -8,18 +8,23 @@ const propTypes = {
|
||||
tooltip: PropTypes.string.isRequired,
|
||||
icon: PropTypes.string,
|
||||
className: PropTypes.string,
|
||||
onClick: PropTypes.func,
|
||||
};
|
||||
const defaultProps = {
|
||||
icon: 'question-circle-o',
|
||||
};
|
||||
|
||||
export default function InfoTooltipWithTrigger({ label, tooltip, icon, className }) {
|
||||
export default function InfoTooltipWithTrigger({ label, tooltip, icon, className, onClick }) {
|
||||
return (
|
||||
<OverlayTrigger
|
||||
placement="right"
|
||||
overlay={<Tooltip id={`${slugify(label)}-tooltip`}>{tooltip}</Tooltip>}
|
||||
>
|
||||
<i className={`fa fa-${icon} ${className}`} />
|
||||
<i
|
||||
className={`fa fa-${icon} ${className}`}
|
||||
onClick={onClick}
|
||||
style={{ cursor: onClick ? 'pointer' : null }}
|
||||
/>
|
||||
</OverlayTrigger>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user