ant-design-vue/components/typography/Paragraph.tsx
tangjinzhou 00dc2add94
chore: update ts type (#5408)
* feat: update prop type

* feat: update ts type

* feat: update ts type

* feat: update ts type

* feat: update ts type

* test: update snap

* feat: update ts type
2022-03-26 22:52:54 +08:00

24 lines
682 B
Vue

import type { ExtractPropTypes, FunctionalComponent } from 'vue';
import omit from '../_util/omit';
import Base, { baseProps } from './Base';
export const paragraphProps = () => omit(baseProps(), ['component']);
export type ParagraphProps = Partial<ExtractPropTypes<ReturnType<typeof paragraphProps>>>;
const Paragraph: FunctionalComponent<ParagraphProps> = (props, { slots, attrs }) => {
const paragraphProps = {
...props,
component: 'div',
...attrs,
};
return <Base {...paragraphProps} v-slots={slots}></Base>;
};
Paragraph.displayName = 'ATypographyParagraph';
Paragraph.inheritAttrs = false;
Paragraph.props = paragraphProps();
export default Paragraph;