mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +08:00
flexible Card title wrapper (#3416)
This commit is contained in:
parent
98c15a5113
commit
10afe1372f
@ -39,11 +39,20 @@ export default (props: CardProps) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const head = title ? (
|
let head;
|
||||||
<div className={`${prefixCls}-head`}>
|
if (!title) {
|
||||||
<h3 className={`${prefixCls}-head-title`}>{title}</h3>
|
head = null;
|
||||||
</div>
|
} else {
|
||||||
) : null;
|
head = typeof title === 'string' ? (
|
||||||
|
<div className={`${prefixCls}-head`}>
|
||||||
|
<h3 className={`${prefixCls}-head-title`}>{title}</h3>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className={`${prefixCls}-head`}>
|
||||||
|
<div className={`${prefixCls}-head-title`}>{title}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div {...others} className={classString}>
|
<div {...others} className={classString}>
|
||||||
|
Loading…
Reference in New Issue
Block a user