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:
parent
fc7ca2830b
commit
ce03dd6baf
@ -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])
|
||||
|
Loading…
x
Reference in New Issue
Block a user