24 lines
684 B
Vue
24 lines
684 B
Vue
import { defineComponent, ExtractPropTypes } from 'vue';
|
|
import PropTypes from '../_util/vue-types';
|
|
|
|
export const skeletonTitleProps = {
|
|
prefixCls: PropTypes.string,
|
|
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
};
|
|
|
|
export type SkeletonTitleProps = Partial<ExtractPropTypes<typeof skeletonTitleProps>>;
|
|
|
|
const SkeletonTitle = defineComponent({
|
|
props: skeletonTitleProps,
|
|
name: 'SkeletonTitle',
|
|
setup(props) {
|
|
return () => {
|
|
const { prefixCls, width } = props;
|
|
const zWidth = typeof width === 'number' ? `${width}px` : width;
|
|
return <h3 class={prefixCls} style={{ width: zWidth }} />;
|
|
};
|
|
},
|
|
});
|
|
|
|
export default SkeletonTitle;
|