Skip to main content

Template Params

C2M transforms all component data within a file into an object (ComponentData) using a structure that makes it easy to use in the template.

ComponentData

All the file data.

PropertyTypeDescription
namestringThe file name without the extension.
componentsComponentDoc[]All components found in the file.

ComponentDoc

All the component data.

PropertyTypeDescription
namestringThe component name.
descriptionstringThe componente description.
propertiesComponentProp[]The description of the component.
isTypeScriptbooleanThe component contains at least one property with TypeScript type
isPropTypebooleanThe component contains at least one property with prop-types type
hasModifiersbooleanWhenever the modifiers has the value true.
betabooleanIt has the @beta or @experimental modifier tag.
alphabooleanIt has the @alpha modifier tag.
publicbooleanIt has the @public modifier tag.
internalbooleanIt has the @internal modifier tag.
virtualbooleanIt has the @virtual modifier tag.
overridebooleanIt has the @override modifier tag.
sealedbooleanIt has the @sealed modifier tag.
deprecatedDocDataBlockTagWhether the component has been marked as deprecated.
remarksDocDataBlockTagDetailed remarks section.
returnsDocDataBlockTagThe return value for a function.
defaultValueDocDataBlockTagThe default value for a field or property,
examplesDocDataBlockTag[]All the section presented as an example
paramsDocDataParam[]Function parameters.

ComponentProp

All the component properties data.

PropertyTypeDescription
namestringThe property name.
typeComponentPropTypeThe property type.
requiredbooleanWhenever the property is required.
requiredText'Yes' | 'No'The required property in text format.
descriptionstringThe componente description.
hasModifiersbooleanWhenever the modifiers has the value true.
betabooleanIt has the @beta or @experimental modifier tag.
alphabooleanIt has the @alpha modifier tag.
publicbooleanIt has the @public modifier tag.
internalbooleanIt has the @internal modifier tag.
virtualbooleanIt has the @virtual modifier tag.
overridebooleanIt has the @override modifier tag.
sealedbooleanIt has the @sealed modifier tag.
deprecatedDocDataBlockTagWhether the component has been marked as deprecated.
remarksDocDataBlockTagDetailed remarks section.
returnsDocDataBlockTagThe return value for a function.
defaultValueDocDataBlockTagThe default value for a field or property,
examplesDocDataBlockTag[]All the section presented as an example
paramsDocDataParam[]Function parameters.

ComponentPropType

PropertyTypeDescription
namestringThe type name.
rawstringThe raw type.

DocDataBlockTag

All text following a block tag, up until the start of the next block tag or modifier tag, is considered to be the block tag's tag content. The content may include Markdown elements and inline tags.

PropertyTypeDescription
contentstringThe tag content.

DocDataParam

PropertyTypeDescription
namestringThe parameter name.
descriptionstringThe parameter description.