RuleLink
API / @publicodes/react-ui / RuleLink
function RuleLink<Name>(props): Element
Defined in: RuleLink.tsx:20
Create a link to a rule in the documentation.
Type Parameters
Type Parameter |
---|
Name extends string |
Parameters
Parameter | Type | Description |
---|---|---|
props | { aria-label : string ; children : ReactNode ; currentEngineId : number ; displayIcon : boolean ; documentationPath : string ; dottedName : Name ; engine : Engine <Name >; href : string ; linkComponent : ComponentType <{ aria-label : string ; children : ReactNode ; href : string ; onClick : () => void ; small : boolean ; title : string ; to : string ; }>; onClick : () => void ; small : boolean ; title : string ; } | - |
props.aria-label ? | string | The aria-label attribute for the link. |
props.children ? | ReactNode | The children to render inside the link Default The title of the rule |
props.currentEngineId ? | number | The current engine ID, if applicable. |
props.displayIcon ? | boolean | Whether to display an icon next to the link. |
props.documentationPath | string | The base path for the documentation. |
props.dottedName | Name | The dotted name of the rule. |
props.engine | Engine <Name > | The engine instance containing the rule. |
props.href ? | string | The href attribute for the link. |
props.linkComponent ? | ComponentType <{ aria-label : string ; children : ReactNode ; href : string ; onClick : () => void ; small : boolean ; title : string ; to : string ; }> | A custom link component to use for rendering the link. |
props.onClick ? | () => void | * Custom function when the link is clicked |
props.small ? | boolean | Whether to render the link in a smaller size. |
props.title ? | string | The title attribute for the link. |
Returns
Element