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;
|