import { FC } from 'react'; import cx from 'classnames'; import { IAlertProps, Alert } from '../alert'; export type StatusBarType = 'info' | 'waiting' | 'success' | 'error'; export interface IStatusBarProps extends Omit { type?: StatusBarType; } const TypePropsMap: Record> = { info: { type: 'info', }, waiting: { type: 'info', loading: true, }, success: { type: 'success', }, error: { type: 'error', }, }; export const StatusBar: FC = ({ type = 'info', progress, className, closable = true, ...rest }) => { const typeProps = TypePropsMap[type]; const taskProgress = type === 'waiting' ? progress : 0; const statusBarClassName = cx('zent-status-bar', className); return ( ); }; export default StatusBar;