UNPKG

nice-ui

Version:

React design system, components, and utilities

33 lines (32 loc) 1.67 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const React = require("react"); const nano_theme_1 = require("nano-theme"); const constants_1 = require("./constants"); const blockClass = (0, nano_theme_1.rule)({ d: 'inline-block', w: '100%', ov: 'hidden', }); const columnClass = (0, nano_theme_1.rule)({ d: 'inline-block', float: 'left', w: '13%', h: constants_1.lineHeight + 'px', mar: '4px 4px 0 0', bdrad: '3px', }); const TablePlaceholder = ({ columns = 3 }) => { const theme = (0, nano_theme_1.useTheme)(); const background = theme.g(0, 0.1); return (React.createElement("span", { className: blockClass }, React.createElement("span", { className: columnClass, style: { background } }), columns > 1 ? React.createElement("span", { className: columnClass, style: { background, width: '8%' } }) : null, columns > 2 ? React.createElement("span", { className: columnClass, style: { background, width: '8%' } }) : null, columns > 3 ? React.createElement("span", { className: columnClass, style: { background, width: '8%' } }) : null, columns > 4 ? React.createElement("span", { className: columnClass, style: { background, width: '8%' } }) : null, columns > 5 ? React.createElement("span", { className: columnClass, style: { background, width: '8%' } }) : null, columns > 6 ? React.createElement("span", { className: columnClass, style: { background, width: '8%' } }) : null, columns > 7 ? React.createElement("span", { className: columnClass, style: { background, width: '8%' } }) : null)); }; exports.default = TablePlaceholder;