Moved refresh button to the right

This commit is contained in:
Bastian Meissner 2020-05-21 10:26:58 +02:00
parent 4a58f79270
commit 4f0160574f
2 changed files with 9 additions and 3 deletions

View file

@ -45,6 +45,12 @@ const ErrorMessage = styled.p`
color: red;
`;
const RefreshButton = styled(Button)`
display: relative;
top: 0;
float: right;
`;
function handleResponse(response) {
if (response.ok) {
return response.json();
@ -79,9 +85,8 @@ const AppList = () => {
} = useAppData();
return (
<ListContainer>
<Headline>
Applications <Button onClick={fetchAppData}>refresh</Button>
</Headline>
<Headline>Applications</Headline>
<RefreshButton onClick={fetchAppData}>refresh</RefreshButton>
<ItemList>
{error && <ErrorMessage>{error}</ErrorMessage>}
{apps.map((app, idx) => {

View file

@ -10,6 +10,7 @@ export const ListContainer = styled.div`
`;
export const Headline = styled.h3`
display: inline-block;
font-family: Roboto, sans-serif;
font-weight: 900;
text-transform: uppercase;