Markdown

Component used to present documentation in a Toolkit element

Usage

The Markdown component takes markdown text and converts it into JSX. Simply import a .md file into your element and pass it to the Markdown component as the value property:

MyElement.js
import React from 'react';
import readme from './readme.md';
import { useHookComponent } from 'reactium-core/sdk';

const MyElement = () => {

    const { Markdown } = useHookComponent('RTK');
    
    return <Markdown value={readme} />
};

The Toolkit plugin extends the Reactium Webpack configuration to allow .md file imports.

Properties

Last updated