UNPKG

jobiqo-cl

Version:

[![CircleCI](https://circleci.com/gh/jobiqo/jobiqo-cl.svg?style=svg&circle-token=5a24efa5b8bbc4879276123e77d0d3f35ca7144c)](https://circleci.com/gh/jobiqo/jobiqo-cl)

44 lines (38 loc) 2.26 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var React = require('react'); var React__default = _interopDefault(React); var reactContentLoader_es = require('../../../../../node_modules/react-content-loader/dist/react-content-loader.es.js'); /** * @file index.tsx * * @fileoverview Shows a placeholder when a table page is loading. */ const TableRow = props => { const random = Math.random() * (1 - 0.7) + 0.7; return (React__default.createElement(reactContentLoader_es.default, Object.assign({ height: 40, width: 1060, speed: 2, primaryColor: "#d9d9d9", secondaryColor: "#ecebeb" }, props), React__default.createElement("rect", { x: "0", y: "15", rx: "4", ry: "4", width: "6", height: "6.4" }), React__default.createElement("rect", { x: "34", y: "13", rx: "6", ry: "6", width: 200 * random, height: "12" }), React__default.createElement("rect", { x: "633", y: "13", rx: "6", ry: "6", width: 23 * random, height: "12" }), React__default.createElement("rect", { x: "653", y: "13", rx: "6", ry: "6", width: 78 * random, height: "12" }), React__default.createElement("rect", { x: "755", y: "13", rx: "6", ry: "6", width: 117 * random, height: "12" }), React__default.createElement("rect", { x: "938", y: "13", rx: "6", ry: "6", width: 83 * random, height: "12" }), React__default.createElement("rect", { x: "0", y: "39", rx: "6", ry: "6", width: "1060", height: ".3" }))); }; /** * Placeholder skeleton for tables for when page is loading. * Skeletons help provide some guidance to the user for * what the page will have while content is loading. */ const TableLoader = () => (React__default.createElement(React__default.Fragment, null, Array(10) .fill('') .map((e, i) => (React__default.createElement(TableRow, { key: i, style: { opacity: Number(2 / i).toFixed(1) } }))))); TableLoader.metadata = { name: 'DaniloWoz', github: 'danilowoz', description: 'Table with the width of the dynamic rows', filename: 'Table' }; exports.TableLoader = TableLoader; exports.default = TableLoader;