summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/components/navigation/LogoutButton.js
blob: 4ab577e00740617a6876171fc1a1b8f6f2a60566 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import PropTypes from 'prop-types'
import React from 'react'
import { NavLink } from 'reactstrap'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faSignOutAlt } from '@fortawesome/free-solid-svg-icons'

const LogoutButton = ({ onLogout }) => (
    <NavLink className="logout" title="Sign out" onClick={onLogout}>
        <FontAwesomeIcon icon={faSignOutAlt} size="lg" />
    </NavLink>
)

LogoutButton.propTypes = {
    onLogout: PropTypes.func.isRequired,
}

export default LogoutButton