UNPKG

@adaptabletools/adaptable

Version:

Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

12 lines (11 loc) 737 B
import * as React from 'react'; import { Box } from 'rebass'; import { useAdaptable } from '../AdaptableContext'; import { getStatusItemStyle } from './Utilities/getStatusItemStyle'; export const SystemStatusStatusBarContent = () => { const adaptable = useAdaptable(); const currentSystemStatusMessageInfo = adaptable.api.systemStatusApi.getCurrentSystemStatusMessageInfo(); const { color, background } = getStatusItemStyle(currentSystemStatusMessageInfo); const message = currentSystemStatusMessageInfo?.statusMessage; return (React.createElement(Box, { style: { borderRadius: 'var(--ab__border-radius)' }, padding: 1, color: message && color, backgroundColor: message && background }, message || '0 Messages')); };