Skip to content

Commit

Permalink
Merge pull request #539 from k-grube/react
Browse files Browse the repository at this point in the history
FIx title button link
  • Loading branch information
KelvinTegelaar authored Jan 7, 2022
2 parents bc79694 + dcee777 commit 7d63f9d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/cipp/TitleButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ import { CButton } from '@coreui/react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faPlus } from '@fortawesome/free-solid-svg-icons'
import PropTypes from 'prop-types'
import { Link } from 'react-router-dom'

export default function TitleButton({ icon = faPlus, title, href }) {
return (
<CButton size="sm" color="primary" href={href}>
<FontAwesomeIcon icon={faPlus} className="pe-1" />
{title}
</CButton>
<Link to={href}>
<CButton size="sm" color="primary">
<FontAwesomeIcon icon={faPlus} className="pe-1" />
{title}
</CButton>
</Link>
)
}

Expand Down

0 comments on commit 7d63f9d

Please sign in to comment.