*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import WarningIcon from 'sonar-ui-common/components/icons/WarningIcon';
import { lazyLoad } from 'sonar-ui-common/components/lazyLoad';
+import { Alert } from 'sonar-ui-common/components/ui/Alert';
import { translate } from 'sonar-ui-common/helpers/l10n';
const AnalysisWarningsModal = lazyLoad(() =>
render() {
return (
<>
- <div className="badge display-inline-flex-center js-component-analysis-warnings flex-1">
- <WarningIcon className="spacer-right" />
+ <Alert className="js-component-analysis-warnings flex-1" display="inline" variant="warning">
<FormattedMessage
defaultMessage={translate('component_navigation.last_analysis_had_warnings')}
id="component_navigation.last_analysis_had_warnings"
)
}}
/>
- </div>
+ </Alert>
{this.state.modal && (
<AnalysisWarningsModal onClose={this.handleCloseModal} warnings={this.props.warnings} />
)}
exports[`should render 1`] = `
<Fragment>
- <div
- className="badge display-inline-flex-center js-component-analysis-warnings flex-1"
+ <Alert
+ className="js-component-analysis-warnings flex-1"
+ display="inline"
+ variant="warning"
>
- <WarningIcon
- className="spacer-right"
- />
<FormattedMessage
defaultMessage="component_navigation.last_analysis_had_warnings"
id="component_navigation.last_analysis_had_warnings"
}
}
/>
- </div>
+ </Alert>
<LazyLoader
onClose={[Function]}
warnings={