fix: alerts width

This commit is contained in:
Rafael Taranto 2025-05-19 10:10:36 +01:00
parent ac62fd449f
commit 628e8a4407

View file

@ -1,6 +1,5 @@
import { useQuery, gql } from '@apollo/client' import { useQuery, gql } from '@apollo/client'
import Button from '@mui/material/Button' import Button from '@mui/material/Button'
import Grid from '@mui/material/Grid'
import classnames from 'classnames' import classnames from 'classnames'
import * as R from 'ramda' import * as R from 'ramda'
import React from 'react' import React from 'react'
@ -56,11 +55,9 @@ const Alerts = ({ onReset, onExpand, size }) => {
</Label1> </Label1>
)} )}
</div> </div>
<Grid <div
className={classnames({ 'm-0': true, 'max-h-115': showAllItems })} className={classnames({ 'm-0 mt-2': true, 'max-h-115': showAllItems })}>
container <div className="w-full flex-1">
spacing={1}>
<Grid item xs={12}>
{!alerts.length && ( {!alerts.length && (
<Label1 className="text-comet -ml-1 h-30"> <Label1 className="text-comet -ml-1 h-30">
No new alerts. Your system is running smoothly. No new alerts. Your system is running smoothly.
@ -71,10 +68,10 @@ const Alerts = ({ onReset, onExpand, size }) => {
alerts={alerts} alerts={alerts}
machines={machines} machines={machines}
/> />
</Grid> </div>
</Grid> </div>
{!showAllItems && alertsLength > NUM_TO_RENDER && ( {!showAllItems && alertsLength > NUM_TO_RENDER && (
<Grid item xs={12}> <div>
<Label1 className="text-center mb-0"> <Label1 className="text-center mb-0">
<Button <Button
onClick={() => onExpand('alerts')} onClick={() => onExpand('alerts')}
@ -85,7 +82,7 @@ const Alerts = ({ onReset, onExpand, size }) => {
{`Show all (${alerts.length})`} {`Show all (${alerts.length})`}
</Button> </Button>
</Label1> </Label1>
</Grid> </div>
)} )}
</> </>
) )