https://github.com/avin/react-asciidoc
React Asciidoctor wrapper
https://github.com/avin/react-asciidoc
Last synced: about 1 year ago
JSON representation
React Asciidoctor wrapper
- Host: GitHub
- URL: https://github.com/avin/react-asciidoc
- Owner: avin
- Created: 2018-11-19T14:44:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-20T09:31:12.000Z (over 7 years ago)
- Last Synced: 2025-05-15T02:36:57.057Z (about 1 year ago)
- Language: JavaScript
- Size: 1010 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-asciidoc
> React wrapper around Asciidoctor.js
[](https://yarnpkg.com/en/package/react-asciidoc) [](LICENSE)
## Demo
Here is an [examples page](https://avin.github.io/react-asciidoc)
## Install
```bash
# Yarn
yarn add react-asciidoc
# NPM
npm install --save react-asciidoc
```
## Usage
```js
import React from 'react';
import Asciidoc from 'react-asciidoc';
import 'react-asciidoc/style.css'; // base Asciidoc style
const DemoComponent = () => *Asciidoc* content here...;
```
## Styling
You can use custom CSS. More info [here...](https://github.com/asciidoctor/asciidoctor-stylesheet-factory)
## API
#### Props
| Property | Type | Required? | Description |
| :----------- | :----- | :-------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| children | String | ✓ | Asciidoc content as string |
| style | Object | | Optional inline style to attach to outermost element. |
| className | String | | Optional CSS className to attach to outermost element. |
| outerTagName | string | | Tag name passed to document.createElement to create the outer container element. This is an advanced property; in most cases, the default ("div") should be used. |
## License
MIT © [avin](https://github.com/avin)