mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-25 00:08:27 +08:00
796b56dbc4
* Add new component Skeleton * Add related doc * Add sample * Add test case ref: https://github.com/ant-design/ant-design/issues/10308
29 lines
595 B
TypeScript
29 lines
595 B
TypeScript
import * as React from 'react';
|
|
import classNames from 'classnames';
|
|
|
|
export interface SkeletonTitleProps {
|
|
prefixCls?: string;
|
|
className?: string;
|
|
style?: object;
|
|
width?: number | string;
|
|
}
|
|
|
|
class Title extends React.Component<SkeletonTitleProps, any> {
|
|
static defaultProps: Partial<SkeletonTitleProps> = {
|
|
prefixCls: 'ant-skeleton-title',
|
|
};
|
|
|
|
render() {
|
|
const { prefixCls, className, width, style } = this.props;
|
|
|
|
return (
|
|
<h3
|
|
className={classNames(prefixCls, className)}
|
|
style={{ width, ...style }}
|
|
/>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default Title;
|