mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
[explore] show validation error on control panel header (#3453)
* [explore] show validation error on control panel header * Linting
This commit is contained in:
committed by
GitHub
parent
f3de758363
commit
3e9f797949
@@ -10,6 +10,7 @@ const propTypes = {
|
||||
className: PropTypes.string,
|
||||
onClick: PropTypes.func,
|
||||
placement: PropTypes.string,
|
||||
bsStyle: PropTypes.string,
|
||||
};
|
||||
const defaultProps = {
|
||||
icon: 'info-circle',
|
||||
@@ -18,14 +19,15 @@ const defaultProps = {
|
||||
};
|
||||
|
||||
export default function InfoTooltipWithTrigger({
|
||||
label, tooltip, icon, className, onClick, placement }) {
|
||||
label, tooltip, icon, className, onClick, placement, bsStyle }) {
|
||||
const iconClass = `fa fa-${icon} ${className} ${bsStyle ? 'text-' + bsStyle : ''}`;
|
||||
return (
|
||||
<OverlayTrigger
|
||||
placement={placement}
|
||||
overlay={<Tooltip id={`${slugify(label)}-tooltip`}>{tooltip}</Tooltip>}
|
||||
>
|
||||
<i
|
||||
className={`fa fa-${icon} ${className}`}
|
||||
className={iconClass}
|
||||
onClick={onClick}
|
||||
style={{ cursor: onClick ? 'pointer' : null }}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user