UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

56 lines (53 loc) 2.76 kB
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 LoadingSkeleton from './LoadingSkeleton'; import { cxBackgroundGray } from './LoadingSkeletonsSvgUtil'; export var SingleLineSkeleton = function SingleLineSkeleton(props) { var _props$width = props.width, width = _props$width === void 0 ? 800 : _props$width, _props$height = props.height, height = _props$height === void 0 ? 20 : _props$height, className = props.className; return /*#__PURE__*/React.createElement("div", { "data-test-id": "loadingSkeleton-SingleLineSkeleton" }, /*#__PURE__*/React.createElement("svg", { "data-test-id": "loadingSkeleton-SingleLineSkeleton-svg", width: width, height: height, xmlns: "http://www.w3.org/2000/svg" }, /*#__PURE__*/React.createElement("g", { id: "SingleLineSkeleton-Details", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd" }, /*#__PURE__*/React.createElement("g", { id: "SingleLineSkeleton-Group" }, /*#__PURE__*/React.createElement("g", { className: cxBackgroundGray('&', className), id: "SingleLineSkeleton-Group-1" }, /*#__PURE__*/React.createElement("rect", { id: "SingleLineSkeleton-Rectangle", x: "0", y: "0", width: width, height: height })))))); }; var SingleLineLoadingSkeleton = function SingleLineLoadingSkeleton(props) { return /*#__PURE__*/React.createElement(LoadingSkeleton, _extends({ "data-test-id": "loadingSkeleton-SingleLineLoadingSkeleton", Skeleton: SingleLineSkeleton }, props)); }; SingleLineLoadingSkeleton.displayName = 'SingleLineLoadingSkeleton'; SingleLineLoadingSkeleton.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. SingleLineLoadingSkeleton 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 SingleLineLoadingSkeleton;