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

import classNames from 'classnames';
import React from 'react';
import './KFModalTitle.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;
