1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

F OpenNebula/one#5422: Fix widgets in mobile

This commit is contained in:
Sergio Betanzos 2021-06-18 09:14:14 +02:00
parent fc7ca2830b
commit ce03dd6baf
No known key found for this signature in database
GPG Key ID: E3E704F097737136
2 changed files with 8 additions and 10 deletions

View File

@ -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>
)

View File

@ -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])