Skip to content

Commit bba1c3c

Browse files
committed
Design improvements: fix charts & overlay on moble screen
1 parent 04d59fe commit bba1c3c

File tree

5 files changed

+37
-32
lines changed

5 files changed

+37
-32
lines changed

src/components/Notification/Notification.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const styles = theme => ({
104104
boxShadow: 'none',
105105
},
106106
notificationIconContainer: {
107-
width: 45,
107+
minWidth: 45,
108108
height: 45,
109109
borderRadius: 45,
110110
display: 'flex',

src/pages/dashboard/Dashboard.js

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -272,33 +272,33 @@ const Dashboard = ({ classes, theme, ...props }) => {
272272
<Grid item lg={3} md={4} sm={6} xs={12}>
273273
<Widget title="Revenue Breakdown" upperTitle className={classes.card}>
274274
<Grid container spacing={16}>
275-
<Grid item sm={6}>
276-
<PieChart
277-
width={160}
278-
height={144}
279-
margin={{ left: theme.spacing.unit * 2 }}
280-
>
281-
<Pie
282-
data={PieChartData}
283-
innerRadius={45}
284-
outerRadius={60}
285-
dataKey="value"
275+
<Grid item xs={6}>
276+
<ResponsiveContainer width="100%" height={144}>
277+
<PieChart
278+
margin={{ left: theme.spacing.unit * 2 }}
286279
>
287-
{PieChartData.map((entry, index) => (
288-
<Cell
289-
key={`cell-${index}`}
290-
fill={theme.palette[entry.color].main}
291-
/>
292-
))}
293-
</Pie>
294-
</PieChart>
280+
<Pie
281+
data={PieChartData}
282+
innerRadius={45}
283+
outerRadius={60}
284+
dataKey="value"
285+
>
286+
{PieChartData.map((entry, index) => (
287+
<Cell
288+
key={`cell-${index}`}
289+
fill={theme.palette[entry.color].main}
290+
/>
291+
))}
292+
</Pie>
293+
</PieChart>
294+
</ResponsiveContainer>
295295
</Grid>
296-
<Grid item sm={6}>
296+
<Grid item xs={6}>
297297
<div className={classes.pieChartLegendWrapper}>
298298
{PieChartData.map(({ name, value, color }, index) => (
299299
<div key={color} className={classes.legendItemContainer}>
300300
<Dot color={color} />
301-
<Typography>&nbsp;{name}&nbsp;</Typography>
301+
<Typography style={{ whiteSpace: 'nowrap' }}>&nbsp;{name}&nbsp;</Typography>
302302
<Typography color="textSecondary">
303303
&nbsp;{value}
304304
</Typography>
@@ -311,6 +311,7 @@ const Dashboard = ({ classes, theme, ...props }) => {
311311
</Grid>
312312
<Grid item xs={12}>
313313
<Widget
314+
bodyClass={classes.mainChartBody}
314315
header={
315316
<div className={classes.mainChartHeader}>
316317
<Typography variant="headline" color="textSecondary">
@@ -348,7 +349,7 @@ const Dashboard = ({ classes, theme, ...props }) => {
348349
</div>
349350
}
350351
>
351-
<ResponsiveContainer width="100%" height={350}>
352+
<ResponsiveContainer width="100%" minWidth={500} height={350}>
352353
<ComposedChart
353354
margin={{ top: 0, right: -15, left: -15, bottom: 0 }}
354355
data={mainChartData}
@@ -488,6 +489,9 @@ const styles = theme => ({
488489
serverOverviewElementChartWrapper: {
489490
width: "100%"
490491
},
492+
mainChartBody: {
493+
overflowX: 'auto',
494+
},
491495
mainChartHeader: {
492496
width: "100%",
493497
display: "flex",
@@ -504,8 +508,8 @@ const styles = theme => ({
504508
order: 3,
505509
width: '100%',
506510
justifyContent: 'center',
507-
marginTop: theme.spacing.unit,
508-
marginBottom: theme.spacing.unit,
511+
marginTop: theme.spacing.unit * 3,
512+
marginBottom: theme.spacing.unit * 2,
509513
}
510514
},
511515
mainChartHeaderLabel: {

src/pages/icons/IconsView.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14701,7 +14701,8 @@ const styles = theme => ({
1470114701
paddingLeft: `${theme.spacing.unit * 4}px !important`,
1470214702
paddingRight: `${theme.spacing.unit * 4}px !important`,
1470314703
color: theme.palette.text.secondary,
14704-
fontSize: 24
14704+
fontSize: 24,
14705+
overflowX: 'hidden'
1470514706
},
1470614707
materialIconText: {
1470714708
marginLeft: theme.spacing.unit * 2,

src/pages/login/LoginView.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,12 @@ const styles = theme => ({
351351
marginLeft: theme.spacing.unit * 4
352352
},
353353
copyright: {
354-
position: "absolute",
355-
bottom: theme.spacing.unit * 2
354+
marginTop: theme.spacing.unit * 4,
355+
whiteSpace: 'nowrap',
356+
[theme.breakpoints.up("md")]: {
357+
position: "absolute",
358+
bottom: theme.spacing.unit * 2,
359+
}
356360
}
357361
});
358362

yarn.lock

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5283,10 +5283,6 @@ jsx-ast-utils@^2.0.1:
52835283
dependencies:
52845284
array-includes "^3.0.3"
52855285

5286-
keycode@^2.1.9:
5287-
version "2.2.0"
5288-
resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.2.0.tgz#3d0af56dc7b8b8e5cba8d0a97f107204eec22b04"
5289-
52905286
killable@^1.0.0:
52915287
version "1.0.1"
52925288
resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892"

0 commit comments

Comments
 (0)