vocdoni / ui-components

Vocdoni UI components libs
GNU General Public License v3.0
3 stars 2 forks source link

Make react markdown (renderer) more configurable #126

Open elboletaire opened 8 months ago

elboletaire commented 8 months ago

There are multiple possible solutions:

  1. Allow to pass a configuration object that would be spread to ReactMarkdown component. This should allow reconfiguring all the defined components.
  2. Additionally to be using a component to render the markdown, a simple function with the raw text could be provided, giving to the end-developer the possibility to use any renderer, and completely removing ReactMarkdown as a dependency (and would close #5). This has a major drawback tho: it's breaking with the current behavior, and would require changes not only in ui-scaffold, but also in ui-explorer.
  3. Create a markdown context and allow to configure the Markdown component when defining such context.

I think it'll be 1, but it could be a fusion between 1 and 2 too (meaning, adding the render function logic, but maintaining the current default behavior)