RichContent: React
RichContent is a component that wraps around some HTML or other components.
Installation
Before you can start using the @mediahuis/chameleon-react
component, you’ll need to install it, for more information check: Getting started for developers.
With that done, you’re now ready to implement the component in your application.
import { RichContent } from '@mediahuis/chameleon-react';
export default function Example() {
return (
<RichContent>
<p>Example</p>
<strong>Strong Example</strong>
</RichContent>
);
}
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
as | ElementType | 'div' | No | Specifies the rendered HTML tag or a different custom component to be used. |
className | String | - | No | Allows extending the class names of the RichContent component. |
style | StyleProps | - | No | Additional inline styles to be applied to the component. The value should be an object following the inline style syntax. |