import React, { PropsWithChildren } from 'react'; import { AlertType } from 'redux/interfaces'; import * as S from './Metrics.styled'; export interface Props { fetching?: boolean; isAlert?: boolean; label: React.ReactNode; title?: string; alertType?: AlertType; } const Indicator: React.FC> = ({ label, title, fetching, isAlert, alertType = 'error', children, }) => (
{label}{' '} {isAlert && ( )} {fetching ? ( ) : ( children )}
); export default Indicator;