@capgeminiuk/dcx-react-library
Version:
[](https://circleci.com/gh/Capgemini/dcx-react-library)
25 lines (24 loc) • 691 B
TypeScript
import React from 'react';
type Props = {
/**
* optional CSS class name
*/
className?: string;
/**
* content of the paragraph. it has precedence to children
*/
value: string | number;
/**
* allow to specify a custom content
*/
children: string | number | JSX.Element;
/**
* Additional props/attributes
*/
props?: React.HTMLAttributes<HTMLParagraphElement>;
};
type ParagraphValue = Omit<Props, 'children'>;
type ParagraphChildren = Omit<Props, 'value'>;
type ParagraphProps = ParagraphValue | ParagraphChildren;
export declare const Paragraph: ({ className, props, ...rest }: ParagraphProps) => JSX.Element;
export {};