refactor: use em instead of px

main
Josue 4 years ago committed by Tsu-ba-me
parent 8df08e6e2c
commit 4d2c140234
  1. 6
      striker-ui/components/Bars/AllocationBar.tsx
  2. 6
      striker-ui/components/Bars/ProgressBar.tsx
  3. 2
      striker-ui/components/Decorator.tsx
  4. 2
      striker-ui/components/Header.tsx
  5. 6
      striker-ui/components/Network/Network.tsx
  6. 22
      striker-ui/components/Nodes/AnvilNode.tsx
  7. 6
      striker-ui/components/Panels/InnerPanel.tsx
  8. 16
      striker-ui/components/Panels/Panel.tsx
  9. 8
      striker-ui/components/Panels/PanelHeader.tsx
  10. 2
      striker-ui/components/Servers.tsx
  11. 8
      striker-ui/components/SharedStorage/SharedStorage.tsx
  12. 12
      striker-ui/components/SharedStorage/SharedStorageNode.tsx

@ -12,14 +12,14 @@ const breakpointAlert = 90;
const BorderLinearProgress = withStyles({ const BorderLinearProgress = withStyles({
root: { root: {
height: 15, height: '1em',
borderRadius: 2, borderRadius: '2px',
}, },
colorPrimary: { colorPrimary: {
backgroundColor: PANEL_BACKGROUND, backgroundColor: PANEL_BACKGROUND,
}, },
bar: { bar: {
borderRadius: 3, borderRadius: '3px',
}, },
})(LinearProgress); })(LinearProgress);

@ -10,14 +10,14 @@ const completed = 100;
const BorderLinearProgress = withStyles({ const BorderLinearProgress = withStyles({
root: { root: {
height: 15, height: '1em',
borderRadius: 2, borderRadius: '2px',
}, },
colorPrimary: { colorPrimary: {
backgroundColor: PANEL_BACKGROUND, backgroundColor: PANEL_BACKGROUND,
}, },
bar: { bar: {
borderRadius: 3, borderRadius: '3px',
}, },
})(LinearProgress); })(LinearProgress);

@ -5,7 +5,7 @@ export type Colours = 'ok' | 'off' | 'error' | 'warning';
const useStyles = makeStyles(() => ({ const useStyles = makeStyles(() => ({
decorator: { decorator: {
width: '20px', width: '1.4em',
height: '100%', height: '100%',
borderRadius: 2, borderRadius: 2,
}, },

@ -13,7 +13,7 @@ const useStyles = makeStyles((theme) =>
paddingRight: theme.spacing(3), paddingRight: theme.spacing(3),
}, },
input: { input: {
height: '40px', height: '2.8em',
width: '30vw', width: '30vw',
backgroundColor: theme.palette.secondary.main, backgroundColor: theme.palette.secondary.main,
borderRadius: '3px', borderRadius: '3px',

@ -13,15 +13,15 @@ const useStyles = makeStyles((theme) => ({
container: { container: {
width: '100%', width: '100%',
overflow: 'auto', overflow: 'auto',
height: '30vh', height: '32vh',
[theme.breakpoints.down('md')]: { [theme.breakpoints.down('md')]: {
height: '100%', height: '100%',
overflow: 'hidden', overflow: 'hidden',
}, },
}, },
root: { root: {
paddingTop: '10px', paddingTop: '0.7em',
paddingBottom: '10px', paddingBottom: '0.7em',
}, },
noPaddingLeft: { noPaddingLeft: {
paddingLeft: 0, paddingLeft: 0,

@ -9,31 +9,31 @@ import Decorator, { Colours } from '../Decorator';
const useStyles = makeStyles((theme) => ({ const useStyles = makeStyles((theme) => ({
root: { root: {
overflow: 'auto', overflow: 'auto',
height: '30vh', height: '24vh',
paddingLeft: '5px', paddingLeft: '0.3em',
[theme.breakpoints.down('md')]: { [theme.breakpoints.down('md')]: {
height: '100%', height: '100%',
overflow: 'hidden', overflow: 'hidden',
}, },
}, },
state: { state: {
paddingLeft: '10px', paddingLeft: '0.7em',
paddingRight: '10px', paddingRight: '0.7em',
paddingTop: '15px', paddingTop: '1em',
}, },
bar: { bar: {
paddingLeft: '10px', paddingLeft: '0.7em',
paddingRight: '10px', paddingRight: '0.7em',
}, },
header: { header: {
paddingTop: '3px', paddingTop: '0.3em',
paddingRight: '10px', paddingRight: '0.7em',
}, },
label: { label: {
paddingTop: '5px', paddingTop: '0.3em',
}, },
decoratorBox: { decoratorBox: {
paddingRight: '5px', paddingRight: '0.3em',
}, },
})); }));

@ -13,9 +13,9 @@ const useStyles = makeStyles(() => ({
borderRadius: '3px', borderRadius: '3px',
borderStyle: 'solid', borderStyle: 'solid',
borderColor: DIVIDER, borderColor: DIVIDER,
marginTop: '20px', marginTop: '1.4em',
marginBottom: '20px', marginBottom: '1.4em',
paddingBottom: '10px', paddingBottom: '0.7em',
position: 'relative', position: 'relative',
}, },
})); }));

@ -8,20 +8,20 @@ type Props = {
const useStyles = makeStyles(() => ({ const useStyles = makeStyles(() => ({
paper: { paper: {
padding: '30px', padding: '2.1em',
backgroundColor: PANEL_BACKGROUND, backgroundColor: PANEL_BACKGROUND,
opacity: 0.8, opacity: 0.8,
zIndex: 999, zIndex: 999,
}, },
container: { container: {
margin: 15, margin: '1em',
position: 'relative', position: 'relative',
}, },
square: { square: {
content: '""', content: '""',
position: 'absolute', position: 'absolute',
width: '30px', width: '2.1em',
height: '30px', height: '2.1em',
border: '1px', border: '1px',
borderColor: TEXT, borderColor: TEXT,
borderWidth: '1px', borderWidth: '1px',
@ -31,12 +31,12 @@ const useStyles = makeStyles(() => ({
margin: 0, margin: 0,
}, },
topSquare: { topSquare: {
top: '-5px', top: '-0.3em',
left: '-5px', left: '-0.3em',
}, },
bottomSquare: { bottomSquare: {
bottom: '-5px', bottom: '-0.3em',
right: '-5px', right: '-0.3em',
}, },
})); }));

@ -10,12 +10,12 @@ type Props = {
const useStyles = makeStyles(() => ({ const useStyles = makeStyles(() => ({
innerHeader: { innerHeader: {
position: 'relative', position: 'relative',
padding: '0 10px', padding: '0 0.7em',
}, },
header: { header: {
top: '-5px', top: '-0.3em',
left: '-5px', left: '-0.3em',
padding: '20px 0', padding: '1.4em 0',
position: 'absolute', position: 'absolute',
content: '""', content: '""',
borderColor: DIVIDER, borderColor: DIVIDER,

@ -13,7 +13,7 @@ const useStyles = makeStyles((theme) => ({
root: { root: {
width: '100%', width: '100%',
overflow: 'auto', overflow: 'auto',
height: '80vh', height: '78vh',
[theme.breakpoints.down('md')]: { [theme.breakpoints.down('md')]: {
height: '100%', height: '100%',
}, },

@ -10,13 +10,13 @@ import { AnvilContext } from '../AnvilContext';
const useStyles = makeStyles((theme) => ({ const useStyles = makeStyles((theme) => ({
header: { header: {
paddingTop: '3px', paddingTop: '0.1em',
paddingRight: '10px', paddingRight: '0.7em',
}, },
root: { root: {
overflow: 'auto', overflow: 'auto',
height: '80vh', height: '78vh',
paddingLeft: '5px', paddingLeft: '0.3em',
[theme.breakpoints.down('md')]: { [theme.breakpoints.down('md')]: {
height: '100%', height: '100%',
}, },

@ -7,16 +7,16 @@ import Decorator from '../Decorator';
const useStyles = makeStyles(() => ({ const useStyles = makeStyles(() => ({
fs: { fs: {
paddingLeft: '10px', paddingLeft: '0.7em',
paddingRight: '10px', paddingRight: '0.7em',
paddingTop: '15px', paddingTop: '1.2em',
}, },
bar: { bar: {
paddingLeft: '10px', paddingLeft: '0.7em',
paddingRight: '10px', paddingRight: '0.7em',
}, },
decoratorBox: { decoratorBox: {
paddingRight: '5px', paddingRight: '0.3em',
}, },
})); }));

Loading…
Cancel
Save