@zohodesk/appmonitor
Advanced tools
Comparing version 1.0.0-exp.2 to 1.0.0-exp.3
{ | ||
"name": "@zohodesk/appmonitor", | ||
"version": "1.0.0-exp.2", | ||
"version": "1.0.0-exp.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -45,3 +45,11 @@ import React, { useState, useEffect } from 'react'; | ||
showBanner && ( | ||
<div style={bannerStyle(isOnline)}> | ||
<div style={{ | ||
position: 'fixed', | ||
top: 0, | ||
width: '100%', | ||
backgroundColor: isOnline ? '#28a745' : '#dc3545', | ||
color: '#fff', | ||
textAlign: 'center', | ||
zIndex: 1000, | ||
}}> | ||
<p>{message}</p> | ||
@@ -54,11 +62,3 @@ </div> | ||
// Dynamic banner style based on network status | ||
const bannerStyle = (isOnline) => ({ | ||
position: 'fixed', | ||
top: 0, | ||
width: '100%', | ||
backgroundColor: isOnline ? '#28a745' : '#dc3545', | ||
color: '#fff', | ||
textAlign: 'center', | ||
zIndex: 1000, | ||
}); | ||
//const bannerStyle = (isOnline) => (); | ||
@@ -65,0 +65,0 @@ // Prop types to make the component more flexible |
2411