({ as, children, href, title, className }: BumpLinkPropsT)
| 12 | } |
| 13 | |
| 14 | export const BumpLink = ({ as, children, href, title, className }: BumpLinkPropsT) => { |
| 15 | const Component = as || 'a' |
| 16 | |
| 17 | let extendedTitle: ReactNode |
| 18 | if (typeof title === 'string') { |
| 19 | extendedTitle = <span className="h4">{title}</span> |
| 20 | } else { |
| 21 | extendedTitle = cloneElement(title, title.props, title.props.children) |
| 22 | } |
| 23 | |
| 24 | return ( |
| 25 | <Component |
| 26 | data-testid="bump-link" |
| 27 | className={cx(styles.container, 'no-underline d-block py-1', className)} |
| 28 | href={href} |
| 29 | > |
| 30 | {extendedTitle} |
| 31 | |
| 32 | {children} |
| 33 | </Component> |
| 34 | ) |
| 35 | } |
nothing calls this directly
no outgoing calls
no test coverage detected