Reactium
Search
⌃K

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:
Component
Markdown
Output
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} />
};
readme.md
# Title
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
Some **bold**, *italic*, ~~strike~~, and `code` text
```
<div>markup</div>
```
> Block quote
The Toolkit plugin extends the Reactium Webpack configuration to allow .md file imports.

Properties

Property
Type
Description
Value
String
The markdown text
Last modified 2yr ago