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

View file

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