Browse Source

ref(ui): Switch StatusIndicator to named export (#68461)

Evan Purkhiser 11 months ago
parent
commit
830cdcd867

+ 3 - 5
static/app/components/statusIndicator.tsx

@@ -3,17 +3,17 @@ import styled from '@emotion/styled';
 
 import {Tooltip} from 'sentry/components/tooltip';
 
-export type StatusIndicatorProps = {
+export interface StatusIndicatorProps {
   status: 'muted' | 'info' | 'warning' | 'success' | 'resolved' | 'error';
   tooltipTitle: React.ReactNode;
-};
+}
 
 /**
  * A badge/indicator at the beginning of the row that displays
  * the color of the status level (Warning, Error, Success, etc)
  *
  */
-function StatusIndicator({status, tooltipTitle}: StatusIndicatorProps) {
+export function StatusIndicator({status, tooltipTitle}: StatusIndicatorProps) {
   let color: keyof Theme['alert'] = 'error';
 
   if (status === 'muted') {
@@ -33,8 +33,6 @@ function StatusIndicator({status, tooltipTitle}: StatusIndicatorProps) {
   );
 }
 
-export default StatusIndicator;
-
 const StatusLevel = styled('div')<{color: keyof Theme['alert']}>`
   position: absolute;
   left: -1px;

+ 1 - 1
static/app/views/alerts/rules/metric/details/metricHistory.tsx

@@ -8,7 +8,7 @@ import {DateTime} from 'sentry/components/dateTime';
 import Duration from 'sentry/components/duration';
 import Link from 'sentry/components/links/link';
 import {PanelTable} from 'sentry/components/panels/panelTable';
-import StatusIndicator from 'sentry/components/statusIndicator';
+import {StatusIndicator} from 'sentry/components/statusIndicator';
 import {t, tn} from 'sentry/locale';
 import {space} from 'sentry/styles/space';
 import type {Organization} from 'sentry/types';

+ 2 - 1
static/app/views/monitors/components/monitorCheckIns.tsx

@@ -11,7 +11,8 @@ import Pagination from 'sentry/components/pagination';
 import {PanelTable} from 'sentry/components/panels/panelTable';
 import Placeholder from 'sentry/components/placeholder';
 import ShortId from 'sentry/components/shortId';
-import StatusIndicator, {
+import {
+  StatusIndicator,
   type StatusIndicatorProps,
 } from 'sentry/components/statusIndicator';
 import Text from 'sentry/components/text';