@momentum-ui/react-collaboration
Version:
Cisco Momentum UI Framework for React Collaboration Applications
30 lines (29 loc) • 833 B
TypeScript
import { FC } from 'react';
import { AllowedTagNames, FontStyle } from '../components/Text/Text.types';
export interface PrimativeConverterProps {
/**
* Item to be tested for conversion.
*/
children: any;
/**
* Class to amend to this primative or component.
*/
className?: string;
/**
* Allowed tag names to wrap the Text. Default: 'p'
*/
tagName?: AllowedTagNames;
/**
* Style of the Text. Default: body-primary.
*/
fontStyle?: FontStyle;
}
/**
* Convert a primitive into a component if needed.
*
* @param props - React FC Props.
* @param props.children - data value to be validated and wrapped into an element.
* @returns - FC of provided child if needed.
*/
declare const PrimitiveConverter: FC<PrimativeConverterProps>;
export { PrimitiveConverter };