lucid-ui
Version:
A UI component library from AppNexus.
51 lines (48 loc) • 2.74 kB
JavaScript
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React from 'react';
import { cxBackgroundGray, cxBackgroundNeutral, SimpleTableSvgPath } from './LoadingSkeletonsSvgUtil';
import LoadingSkeleton from './LoadingSkeleton';
export var SimpleTableSkeleton = function SimpleTableSkeleton(props) {
var _props$width = props.width,
width = _props$width === void 0 ? 880 : _props$width,
_props$height = props.height,
height = _props$height === void 0 ? 50 : _props$height,
className = props.className;
return /*#__PURE__*/React.createElement("div", {
"data-test-id": "loadingSkeleton-SimpleTableSkeleton"
}, /*#__PURE__*/React.createElement("svg", {
"data-test-id": "loadingSkeleton-SimpleTableSkeleton-svg",
width: width,
height: height,
xmlns: "http://www.w3.org/2000/svg"
}, /*#__PURE__*/React.createElement("g", {
fill: "none",
fillRule: "evenodd"
}, /*#__PURE__*/React.createElement("path", {
className: cxBackgroundNeutral('&', className),
d: "M0 0h2642v50H0z"
}), /*#__PURE__*/React.createElement("path", {
className: cxBackgroundGray('&', className),
d: "M0 49h2642v1H0z"
}), /*#__PURE__*/React.createElement("path", {
className: cxBackgroundGray('&', className),
d: SimpleTableSvgPath
}))));
};
var SimpleTableLoadingSkeleton = function SimpleTableLoadingSkeleton(props) {
return /*#__PURE__*/React.createElement(LoadingSkeleton, _extends({
"data-test-id": "loadingSkeleton-SimpleTableLoadingSkeleton",
Skeleton: SimpleTableSkeleton
}, props));
};
SimpleTableLoadingSkeleton.displayName = 'SimpleTableLoadingSkeleton';
SimpleTableLoadingSkeleton.peek = {
description: "\n\t\tA loading indicator wrapper with optional overlay.\n\t",
notes: {
overview: "\n\t\t\tA visual indication that a section or component of the interface is loading. Designed to indicate loading data\n\t\t",
intendedUse: "\n\t\t\t- Use in places where data takes time to load. SimpleTableLoadingSkeleton lets users know that the information they expect to see will appear shortly.\t\t\n\t\t",
technicalRecommendations: "\n\t\t\tIf a page is displaying a lot of data coming from multiple sources, try as best as possible to load the \n\t\t\tindividual parts of the UI, so as not to disrupt the user and block them from interacting with the entire page until all data is loaded.\n\t\t"
},
categories: ['Loading Indicator']
};
export default SimpleTableLoadingSkeleton;