/*
 * @Author: 赵伟
 * @Date: 2024-04-28 14:18:11
 * @Description: 自定义 Modal Title
 */

import classNames from 'classnames';
import React from 'react';
import './index.less';

type ModalTitleProps = {
  title: React.ReactNode;
  image?: string;
  style?: React.CSSProperties;
  className?: string;
};

function ModalTitle({ title, image, style, className }: ModalTitleProps) {
  return (
    <div className={classNames('kf-modal-title', className)} style={style}>
      {image && <img className={'kf-modal-title__image'} src={image} draggable={false} alt="" />}
      {title}
    </div>
  );
}

export default ModalTitle;
