update App.jsx and improve coverage

abstract LogoutButton to component
This commit is contained in:
John Mitchell
2018-11-02 17:47:59 -04:00
parent 08d2718f5e
commit 7b099578c8
4 changed files with 90 additions and 11 deletions

View File

@@ -0,0 +1,26 @@
import React from 'react';
import {
Button,
ButtonVariant
} from '@patternfly/react-core';
import { UserIcon } from '@patternfly/react-icons';
const LogoutButton = ({ onDevLogout }) => (
<Button
id="button-logout"
aria-label="Logout"
variant={ButtonVariant.plain}
onClick={onDevLogout}
onKeyDown={event => {
if (event.keyCode === 13) {
onDevLogout();
}
}}
>
<UserIcon />
</Button>
);
export default LogoutButton;