summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/components/navigation/LogoutButton.js
blob: 78b02b446eb7428476625326afa25f54efac2097 (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 FontAwesome from 'react-fontawesome'
import { Link } from 'react-router-dom'
import { NavLink } from 'reactstrap'

const LogoutButton = ({ onLogout }) => (
    <NavLink tag={Link} className="logout" title="Sign out" to="#" onClick={onLogout}>
        <FontAwesome name="power-off" size="lg" />
    </NavLink>
)

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

export default LogoutButton