UNPKG

lucid-ui

Version:

A UI component library from Xandr.

38 lines 2.5 kB
import _ from 'lodash'; import React from 'react'; import { cxBackgroundGray } from './LoadingSkeletonsSvgUtil'; import LoadingSkeleton from './LoadingSkeleton'; export const GroupSkeleton = (props) => { const { width = 300, height = 55, className } = props; const bottomRectWidth = _.toNumber(width) - _.toNumber(width) / 3; return (React.createElement("div", { "data-test-id": 'loadingSkeleton-GroupSkeleton' }, React.createElement("svg", { "data-test-id": 'loadingSkeleton-GroupSkeleton-svg', width: width, height: height, version: '1.1', xmlns: 'http://www.w3.org/2000/svg' }, React.createElement("g", { id: 'GroupSkeleton-Details', stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' }, React.createElement("g", { id: 'GroupSkeleton-Group' }, React.createElement("g", { id: 'GGroupSkeleton-Group-1', className: cxBackgroundGray('&', className) }, React.createElement("rect", { id: 'Rectangle', x: '0', y: '0' })), React.createElement("rect", { className: cxBackgroundGray('&', className), id: 'GroupSkeleton-Rectangle-1', x: '10', y: '13', width: width, height: '10' }), React.createElement("rect", { className: cxBackgroundGray('&', className), id: 'GroupSkeleton-Rectangle-2', x: '10', y: '32', width: bottomRectWidth, height: '18' })))))); }; const GroupLoadingSkeleton = (props) => { return (React.createElement(LoadingSkeleton, { "data-test-id": 'loadingSkeleton-GroupLoadingSkeleton', Skeleton: GroupSkeleton, ...props })); }; GroupLoadingSkeleton.displayName = 'GroupLoadingSkeleton'; GroupLoadingSkeleton.peek = { description: `A loading indicator wrapper with optional overlay.`, notes: { overview: ` A visual indication that a section or component of the interface is loading. Designed to indicate loading data `, intendedUse: ` - Use in places where data takes time to load. GroupLoadingSkeleton lets users know that the information they expect to see will appear shortly. `, technicalRecommendations: ` If a page is displaying a lot of data coming from multiple sources, try as best as possible to load the individual 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. `, }, categories: ['Loading Indicator'], }; export default GroupLoadingSkeleton; //# sourceMappingURL=GroupLoadingSkeleton.js.map