
Some checks are pending
NPM Installation / build (16.x, ubuntu-latest) (push) Waiting to run
NPM Installation / build (16.x, windows-latest) (push) Waiting to run
NPM Installation / build (17.x, ubuntu-latest) (push) Waiting to run
NPM Installation / build (17.x, windows-latest) (push) Waiting to run
NPM Installation / build (18.x, ubuntu-latest) (push) Waiting to run
NPM Installation / build (18.x, windows-latest) (push) Waiting to run
32 lines
703 B
JavaScript
32 lines
703 B
JavaScript
import PropTypes from 'prop-types'
|
|
import React from 'react'
|
|
import { CLink } from '@coreui/react'
|
|
|
|
const DocsLink = (props) => {
|
|
const { href, name, text, ...rest } = props
|
|
|
|
const _href = name ? `https://coreui.io/react/docs/components/${name}` : href
|
|
|
|
return (
|
|
<div className="float-end">
|
|
<CLink
|
|
{...rest}
|
|
href={_href}
|
|
rel="noreferrer noopener"
|
|
target="_blank"
|
|
className="card-header-action"
|
|
>
|
|
<small className="text-body-secondary">{text || 'docs'}</small>
|
|
</CLink>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
DocsLink.propTypes = {
|
|
href: PropTypes.string,
|
|
name: PropTypes.string,
|
|
text: PropTypes.string,
|
|
}
|
|
|
|
export default React.memo(DocsLink)
|