RulePage
API / @publicodes/react-ui / RulePage
function RulePage(props): Element Defined in: rule/RulePage.tsx:38
Display the documentation page of a given rule
See the sandbox to see the component in action (it is displayed on the right screen).
Parameters
| Parameter | Type | Description |
|---|---|---|
props | { apiDocumentationUrl: string; apiEvaluateUrl: string; displayIcon: boolean; documentationPath: string; engine: Engine; language: "fr" | "en"; mainContentId: string; mobileMenuPortalId: string; npmPackage: string; openNavButtonPortalId: string; renderers: SupportedRenderers; rulePath: string; rulesToHide: string[]; searchBar: boolean; showDevSection: boolean; } | - |
props.apiDocumentationUrl? | string | The URL for the API documentation. |
props.apiEvaluateUrl? | string | The URL for the API evaluation. |
props.displayIcon? | boolean | Whether to display an icon next to the rule links. |
props.documentationPath | string | The base path on which the documentation will be mounted. For example, if it is /documentation, the URL of the rule remuneration.primes will be /documentation/remuneration/primes. |
props.engine | Engine | The engine object whose calculations we want to display. |
props.language | "fr" | "en" | The language in which to display the documentation (currently, only ‘fr’ and ‘en’ are supported). |
props.mainContentId? | string | Define a custom id for the main content in order to be able to focus it with a skip link i.e. |
props.mobileMenuPortalId? | string | The ID of the portal for the mobile menu. |
props.npmPackage? | string | The name of the npm package. |
props.openNavButtonPortalId? | string | The ID of the portal for the open navigation button. |
props.renderers | SupportedRenderers | The React components that will be used in the documentation page. |
props.rulePath | string | The path of the rule to display. |
props.rulesToHide? | string[] | The dotted name we want the value to be hidden. |
props.searchBar? | boolean | Displays a search bar to navigate through the documentation Default false |
props.showDevSection? | boolean | Whether to show the development section. Default true |
Returns
Element