F OpenNebula/one#5422: Fix widgets in mobile

This commit is contained in:
Sergio Betanzos committed 2021-06-22 09:26:00 +02:00
1 parent fc7ca2830b
commit ce03dd6baf
2 files changed
+8 -10

No files matched your search

@@ -6,7 +6,6 @@ import { makeStyles, Typography } from '@material-ui/core'
const useStateStyles = makeStyles(theme => ({
root: {
color: theme.palette.text.secondary,
width: 'max-content',
'&::before': {
content: "''",
display: 'inline-flex',
@@ -22,7 +21,7 @@ const useStateStyles = makeStyles(theme => ({
const TypographyWithPoint = ({ pointColor, children }) => {
const classes = useStateStyles({ color: pointColor })
return (
<Typography className={classes.root}>
<Typography noWrap className={classes.root}>
{children}
</Typography>
)
@@ -1,3 +1,4 @@
import * as React from 'react'
import { PieChart } from 'react-minimal-pie-chart'
@@ -42,14 +43,12 @@ const TotalProviders = () => {
const legend = React.useMemo(() => (
<div>
{chartData?.map(({ title: titleLegend, value, color }) =>
<div key={titleLegend}>
<TypographyWithPoint pointColor={color}>
<Count number={`${value}`} />
<Typography component='span' className={classes.legendSecondary}>
{titleLegend}
</Typography>
</TypographyWithPoint>
</div>
<TypographyWithPoint key={titleLegend} pointColor={color}>
<Count number={`${value}`} />
<span className={classes.legendSecondary} title={titleLegend}>
{titleLegend}
</span>
</TypographyWithPoint>
)}
</div>
), [classes, chartData])