mirror of
https://github.com/apache/superset.git
synced 2026-05-11 19:05:24 +00:00
refactor: Replace react-bootstrap tooltips with Antd tooltips (#11737)
* Refactor tooltip in ColumnElement * Refactor tooltip for Button * Remove redundant import * Refactor tooltip in SqlEditor * Increase line height in tooltip so that the text is centered * Refactor tooltip in Link * Refactor tooltip in AdhocMetricEditPopoverTitle * Refactor tooltip from ControlHeader * Refactor tooltip in DateFilterControl * Refactor tooltip in VizTypeControl * fixup! Refactor tooltip in AdhocMetricEditPopoverTitle * Refactor tooltip in QueryAndSaveBtns * fixup! Refactor tooltip in DateFilterControl * Refactor tooltip in CopyToClipboard, fix cursor pointer * Refactor tooltip in TooltipWrapper * Refactor tooltip in Field/DatasourceEditor * Remove redundant import * Fix typing for placement prop * Decrease margin in ColumnElement divider * Change default export to named * Move SqlLab Tooltip styles to Emotion * Fix tests
This commit is contained in:
committed by
GitHub
parent
75086f8979
commit
9b68b65568
@@ -20,7 +20,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
|
||||
import { OverlayTrigger, Tooltip } from 'react-bootstrap';
|
||||
import { Tooltip } from 'src/common/components/Tooltip';
|
||||
import FormLabel from 'src/components/FormLabel';
|
||||
|
||||
const propTypes = {
|
||||
@@ -98,40 +98,35 @@ export default class ControlHeader extends React.Component {
|
||||
</span>{' '}
|
||||
{this.props.warning && (
|
||||
<span>
|
||||
<OverlayTrigger
|
||||
<Tooltip
|
||||
id="error-tooltip"
|
||||
placement="top"
|
||||
overlay={
|
||||
<Tooltip id="error-tooltip">{this.props.warning}</Tooltip>
|
||||
}
|
||||
title={this.props.warning}
|
||||
>
|
||||
<i className="fa fa-exclamation-circle text-warning" />
|
||||
</OverlayTrigger>{' '}
|
||||
</Tooltip>{' '}
|
||||
</span>
|
||||
)}
|
||||
{this.props.danger && (
|
||||
<span>
|
||||
<OverlayTrigger
|
||||
<Tooltip
|
||||
id="error-tooltip"
|
||||
placement="top"
|
||||
overlay={
|
||||
<Tooltip id="error-tooltip">{this.props.danger}</Tooltip>
|
||||
}
|
||||
title={this.props.danger}
|
||||
>
|
||||
<i className="fa fa-exclamation-circle text-danger" />
|
||||
</OverlayTrigger>{' '}
|
||||
</Tooltip>{' '}
|
||||
</span>
|
||||
)}
|
||||
{this.props.validationErrors.length > 0 && (
|
||||
<span>
|
||||
<OverlayTrigger
|
||||
<Tooltip
|
||||
id="error-tooltip"
|
||||
placement="top"
|
||||
overlay={
|
||||
<Tooltip id="error-tooltip">
|
||||
{this.props.validationErrors.join(' ')}
|
||||
</Tooltip>
|
||||
}
|
||||
title={this.props.validationErrors.join(' ')}
|
||||
>
|
||||
<i className="fa fa-exclamation-circle text-danger" />
|
||||
</OverlayTrigger>{' '}
|
||||
</Tooltip>{' '}
|
||||
</span>
|
||||
)}
|
||||
{this.renderOptionalIcons()}
|
||||
|
||||
Reference in New Issue
Block a user