Skip to content

Commit

Permalink
Confine the device chart on homepage in a predefined height
Browse files Browse the repository at this point in the history
Prevent the chart from growing indefinitely on large viewports, and set
instead a maximum dimension.

Signed-off-by: Davide Briani <davide.briani@secomind.com>
  • Loading branch information
davidebriani committed Apr 15, 2024
1 parent 227abdf commit fbe30e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ const DevicesCard = ({
</Card.Text>
</Col>
<Col xs={12} lg={6}>
{totalDevices > 0 && <ConnectedDevicesChart provider={connectedDevicesProvider} />}
<div style={{ maxHeight: '18em' }}>
{totalDevices > 0 && <ConnectedDevicesChart provider={connectedDevicesProvider} />}
</div>
</Col>
</Row>
</Container>
Expand Down

0 comments on commit fbe30e1

Please sign in to comment.