2.1.0 • Published 4 years ago

react-admonitions v2.1.0

Weekly downloads
175
License
MIT
Repository
github
Last release
4 years ago

react-admonitions

An admonitions React component, ported from remarkable-admonitions. Perfect for Docusaurus v2 and other React-based doc generators.

NPM JavaScript Style Guide Build Status

TL;DR Nice-looking hints, warnings, etc. specifically targeted toward Docusaurus docs websites.

Test the component out on Stackblitz, or view the demo

Install

npm install --save react-admonitions

Screenshots

Example Pictures

Usage

import React, { Component } from 'react'

import Admonition from 'react-admonitions'

class Example extends Component {
  render() {
    return (
      <Admonition type="warning" title="Do not do this">
        Admonition Content
      </Admonition>
    )
  }
}

Props

NameDefaultDescription
typenoneWhat type of admonition you want to display. Valid options: "warning", "tip", "caution", "note", "important", "question"
iconType"svg"The type of admonition icon. Valid options: "svg", "emoji"
titlenoneThe, well, title of the admonition

Credits

HTML, styles, and concept all come from the amazing Markdown plugin by @favoloso, remarkable-admonitions.

License

MIT © nebrelbug

2.1.0

4 years ago

2.0.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago