Caption
Reference
- Caption is used to displaying text caption.
- The Caption component is text element that adapts its styles based on the theme and the props provided.
- It is ideal for rendering small pieces of text, such as captions, labels, or descriptions.
Props
lineHeight(optional): Specifies the line height of the text.color(optional): Specifies the color of the text.fontWeight(optional): Specifies the font weight of the text.textAlign(optional): Specifies the text alignment (e.g., left, center, right).
Usage Example
const { protrakComponents } = React.useContext(customWidgetContext);
const { Caption, SmallCaption } = protrakComponents;
return (
<Caption
fontWeight="bold"
lineHeight="1.5"
textAlign="center"
>
Custom Caption
</Caption>
<SmallCaption>
Small Custom Caption
</SmallCaption>
);