zhengyiming
2025-07-10 5c33978e9e3e934378d8f2153a2cd919b1cb6ddd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import IconTitleBg from '@/assets/common/icon-title-bg.png';
import { BasicComponent, ComponentDefaults } from '@/utils/typings';
import classNames from 'classnames';
import * as React from 'react';
 
import './Title.less';
 
export type TitleProps = {
  title?: string;
  large?: boolean;
} & BasicComponent;
 
const defaultProps = {
  ...ComponentDefaults,
};
 
function Title(props: TitleProps) {
  const { className, children, large, title, ...rest } = props;
  return (
    <div
      className={classNames('title-card-wrapper', className, { large })}
      style={{ backgroundImage: `url(${IconTitleBg})` }}
    >
      <div className="title-card-title">{title}</div>
    </div>
  );
}
 
Title.defaultProps = defaultProps;
 
export default Title;