@publicodes/react-ui

API / @publicodes/react-ui

This package exports React components to display a publicodes explanation page and rule links. It requires the publicodes core package to be installed.

Getting started

npm install publicodes publicodes-react

Then follow the tutorial to create a simple page.

You can also jump to a specific guide for your framework:

Functions

FunctionDescription
getDocumentationSiteMapGet all the URLs of the documentation pages and their corresponding rule names.

Components

FunctionDescription
ExplanationDisplay the documentation of a parsed publicodes AST node
RuleLinkCreate a link to a rule in the documentation.
RulePageDisplay the documentation page of a given rule

Type Aliases

Type aliasDescription
SupportedRenderersThe custom renderers for the markdown content.