nice-ui
Version:
React design system, components, and utilities
23 lines (22 loc) • 802 B
JavaScript
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%',
});
const greyClass = (0, nano_theme_1.rule)({
d: 'inline-block',
h: constants_1.lineHeight + 'px',
mar: '4px 0 0',
bdrad: '3px',
});
const ParagraphPlaceholder = React.memo(() => {
const theme = (0, nano_theme_1.useTheme)();
const background = theme.g(0, 0.1);
return (React.createElement("span", { className: blockClass },
React.createElement("span", { className: greyClass, style: { background, width: 70 + Math.random() * 10 + '%' } })));
});
exports.default = ParagraphPlaceholder;
;