refactor: Move Badge to Antdesign (#11899)

* Move Badge to Antdesign

* Export enhanced badge only

* Center number in badge
This commit is contained in:
Geido
2020-12-05 03:06:54 +02:00
committed by GitHub
parent 64d6fb9f6f
commit 2c323426d1
6 changed files with 64 additions and 9 deletions

View File

@@ -18,7 +18,7 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
import { Badge } from 'react-bootstrap';
import Badge from 'src/common/components/Badge';
import { t, styled } from '@superset-ui/core';
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
@@ -127,7 +127,7 @@ export default class TemplateParamsEditor extends React.Component {
triggerNode={
<Button tooltip={t('Edit template parameters')} buttonSize="small">
{`${t('parameters')} `}
{paramCount > 0 && <Badge>{paramCount}</Badge>}
<Badge count={paramCount} />
{!this.state.isValid && (
<InfoTooltipWithTrigger
icon="exclamation-triangle"