Skip to content

Commit 5e7fd94

Browse files
lucbpzPive01
andauthored
Small UI Improvements (#17)
* fix(UI): fix UI elements * fix(ui): remove white color on icon, and change webapp button to outlined * Update ui/src/components/Header/Controller.tsx Co-authored-by: Luca Pivetta <36865043+Pive01@users.noreply.github.com>
1 parent e1751f2 commit 5e7fd94

File tree

5 files changed

+34
-29
lines changed

5 files changed

+34
-29
lines changed

ui/src/components/Configs/ConfirmableButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ export const ConfirmableButton = ({
6666
)}
6767
<DialogActions>
6868
<Button
69-
color="secondary"
69+
variant="outlined"
7070
onClick={() => setShowConfirmDialog(false)}
7171
>
7272
{cancelText || 'Cancel'}
7373
</Button>
7474
<Button
7575
autoFocus
76-
color="primary"
76+
color="error"
7777
variant="contained"
7878
onClick={(event: MouseEvent<HTMLButtonElement>) => {
7979
if (rest.onClick) rest.onClick(event as any); // eslint-disable-line

ui/src/components/Configs/StartConfigs.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export const StartConfigs = (): ReactElement => {
4545
<ConfirmableButton
4646
component="IconButton"
4747
disabled={params.row.id === DEFAULT_CONFIGURATION_ID}
48-
title={`Remove ${params.row.name} configuration?`}
48+
title={`Delete ${params.row.name} configuration?`}
49+
okText="Delete"
4950
onClick={() => deleteConfig(params.row.id)}
5051
text="Selected configuration will be permanently deleted"
5152
>

ui/src/components/Header/Controller.tsx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { ReactElement, useEffect, useState } from 'react';
2-
import { Chip, Button, ButtonGroup, Select, MenuItem, FormControl } from '@mui/material';
2+
import { Chip, Button, ButtonGroup, Select, MenuItem, FormControl, Box } from '@mui/material';
33
import { PlayArrow, Stop } from '@mui/icons-material';
44
import { v4 as uuid } from 'uuid';
55
import { createStyles, makeStyles } from '@mui/styles';
@@ -48,17 +48,17 @@ export const Controller = (): ReactElement => {
4848
};
4949

5050
return (
51-
<>
51+
<Box display="flex" gap={1} alignItems="center">
5252
<ButtonGroup variant="outlined">
5353
{isRunning ?
5454
<Button
5555
variant="contained"
5656
onClick={stop}
57-
endIcon={<Stop />}>
57+
startIcon={<Stop />}>
5858
Stop
5959
</Button>
6060
:
61-
<>
61+
<Box display="flex" alignItems="center">
6262
<FormControl sx={{ m: 1, minWidth: 120, border: 'none' }} size="small">
6363
<Select
6464
className={classes.selectForm}
@@ -72,22 +72,23 @@ export const Controller = (): ReactElement => {
7272
}
7373
</Select>
7474
</FormControl>
75-
<Button
76-
variant="contained"
77-
onClick={start}
78-
endIcon={<PlayArrow />}>
79-
Start
80-
</Button>
81-
</>
75+
<Box>
76+
<Button
77+
variant="contained"
78+
onClick={start}
79+
startIcon={<PlayArrow />}>
80+
Start
81+
</Button>
82+
</Box>
83+
</Box>
8284
}
8385
</ButtonGroup>
8486
<Chip
85-
style={{ borderRadius: 20 }}
8687
label={isRunning ? 'Running' : 'Stopped'}
87-
color={isRunning ? 'success' : 'error'}
88-
88+
color={isRunning ? 'success' : 'warning'}
89+
sx={{ p: 2, borderRadius: 10 }}
8990
/>
9091
<LongMenu />
91-
</>
92+
</Box>
9293
);
9394
};

ui/src/components/Header/Header.tsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,23 @@ export const Header = (): ReactElement => {
1010
return (
1111
<AppBar position="relative" elevation={0}>
1212
<Toolbar>
13-
<Box display='flex' flexGrow={1}>
14-
<Typography variant='h3' sx={{ my: 2, mr: 3 }}>
13+
<Box display="flex" flexGrow={1} alignItems="center" flexWrap="wrap">
14+
<Typography variant="h3" color={(theme) => theme.palette.text.primary} sx={{ my: 2, mr: 3 }}>
1515
LocalStack
1616
</Typography>
17-
<Button
18-
color="inherit"
19-
onClick={() => ddClient.host.openExternal('https://app.localstack.cloud')}
20-
endIcon={<OpenInNew />}
21-
>
22-
Web App
23-
</Button>
17+
<Box>
18+
<Button
19+
variant="outlined"
20+
onClick={() =>
21+
ddClient.host.openExternal('https://app.localstack.cloud')
22+
}
23+
endIcon={<OpenInNew />}
24+
>
25+
Web App
26+
</Button>
27+
</Box>
2428
</Box>
2529
<Controller />
26-
2730
</Toolbar>
2831
</AppBar>
2932
);

ui/src/components/Header/Menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const LongMenu = () => {
3535
aria-haspopup="true"
3636
onClick={handleClick}
3737
>
38-
<MoreVert htmlColor='#FFFFFF' />
38+
<MoreVert />
3939
</IconButton>
4040
<Menu
4141
id="long-menu"

0 commit comments

Comments
 (0)