@cimpress/react-components
Version:
React components to support the MCP styleguide
29 lines • 1.11 kB
JavaScript
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const Robot_1 = require("../Robot");
const defaultNoDataText = 'There are no data to display.';
const TableNoData = ({ children, loading, entireHeaderHeight = 0, }) => {
if (loading) {
return null;
}
return (react_1.default.createElement("div", { style: {
position: 'absolute',
left: 0,
top: entireHeaderHeight,
bottom: 0,
width: '100%',
backgroundColor: 'white',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
} },
react_1.default.createElement(Robot_1.Robot, { status: "warning" }),
react_1.default.createElement("h4", null, children || defaultNoDataText)));
};
exports.default = TableNoData;
//# sourceMappingURL=TableNoData.js.map