MCPcopy Create free account
hub / github.com/github/docs / BumpLink

Function BumpLink

components/ui/BumpLink/BumpLink.tsx:14–35  ·  view source on GitHub ↗
({ as, children, href, title, className }: BumpLinkPropsT)

Source from the content-addressed store, hash-verified

12}
13
14export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected