@radix-ui/themes
Version:
[](https://radix-ui.com/themes)
3 lines (2 loc) • 634 B
JavaScript
import*as o from"react";import a from"classnames";import{Slot as m}from"@radix-ui/react-slot";import{skeletonPropDefs as f}from"./skeleton.props.js";import{extractProps as d}from"../helpers/index.js";import{marginPropDefs as P}from"../props/index.js";const t=o.forwardRef((r,n)=>{const{children:e,className:p,loading:s,...i}=d(r,f,P);if(!s)return e;const l=o.isValidElement(e)?m:"span";return o.createElement(l,{ref:n,"aria-hidden":!0,className:a("rt-Skeleton",p),"data-inline-skeleton":o.isValidElement(e)?void 0:!0,tabIndex:-1,inert:"",...i},e)});t.displayName="Skeleton";export{t as Skeleton};
//# sourceMappingURL=skeleton.js.map