@bdt-component-library/link
v0.5.9
Published
Link component
Downloads
58
Readme
Link Component
About
This is a component published as its own package from our component library monorepo: https://github.com/BenefitsDataTrust/ui-components. Setup instructions, as well as higher-level goals and concerns can be found from the main project README.
Description
Handles display of links according to style guide conventions.
- https://zeroheight.com/990ea04ab/p/55b9eb-links
API
| prop | type | required | default | explanation | |-----------|--------|----------|---------|--------------| | className | string | no | "" | Adds an optional classname to the component | | children | React node | yes | n/a | The inner content of the component | | url | string | yes | n/a | The href for the link | | role | string | no | "" | The role attr for the link | | isExternal | boolean | no | false | Affects the rel, target, and visual distinctions for external links | | isTruncated | boolean | no | false | Changes styles to use truncation | | isActive | boolean | no | true | Changes styles to inactive | | isUnderlined | boolean | no | true | Determines whether or not to use underline with link | | display | enum("default", "light", "white") | no | "default" | Changes the foreground/background color mode | | onClick | function(e: event) | no | () => {} | Function executed in place of default a tag behavoir for internal redirects |