nebrelbug / react-admonitions

An admonitions React component, ported from remarkable-admonitions. Perfect for Docusaurus v2 and other React-based doc generators
https://nebrelbug.github.io/react-admonitions/
11 stars 4 forks source link

Match new remark-admonitions look #16

Open bendtherules opened 4 years ago

bendtherules commented 4 years ago

remark-admonitions has a new look now - https://github.com/elviswolcott/remark-admonitions#remark-admonitions. This library components match the old look. Can we make this configurable?

I suggest -

  1. A version of these components with only reference to global css classes, which the user will import (no css-modules).

    By not copying the css classes, we can make sure that style changes doesn't affect this component. Docusaurus will anyway import this global css file, so user's don't need to bother in that case. This will also allow implementing custom types.

  2. Add proper test cases - transform markdown using remark-admonitions to get html1 and render this component to get html2 - match they are exactly same or not.
    This will again ensure that they are always in sync.

nebrelbug commented 4 years ago

@bendtherules your suggestions are great.

Unfortunately, I don't have time right now to implement the changes. However, I'd be happy to review and merge a PR!