UNPKG

@radix-ui/themes

Version:

[![Radix Themes Logo](https://radix-ui.com/social/themes.png)](https://radix-ui.com/themes)

3 lines (2 loc) 1.23 kB
"use strict";var S=Object.create;var p=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var D=(e,o)=>{for(var t in o)p(e,t,{get:o[t],enumerable:!0})},l=(e,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of g(o))!x.call(e,r)&&r!==t&&p(e,r,{get:()=>o[r],enumerable:!(n=y(o,r))||n.enumerable});return e};var a=(e,o,t)=>(t=e!=null?S(h(e)):{},l(o||!e||!e.__esModule?p(t,"default",{value:e,enumerable:!0}):t,e)),E=e=>l(p({},"__esModule",{value:!0}),e);var R={};D(R,{Skeleton:()=>i});module.exports=E(R);var s=a(require("react")),m=a(require("classnames")),f=require("@radix-ui/react-slot"),d=require("./skeleton.props.js"),P=require("../helpers/index.js"),k=require("../props/index.js");const i=s.forwardRef((e,o)=>{const{children:t,className:n,loading:r,...c}=(0,P.extractProps)(e,d.skeletonPropDefs,k.marginPropDefs);if(!r)return t;const u=s.isValidElement(t)?f.Slot:"span";return s.createElement(u,{ref:o,"aria-hidden":!0,className:(0,m.default)("rt-Skeleton",n),"data-inline-skeleton":s.isValidElement(t)?void 0:!0,tabIndex:-1,inert:"",...c},t)});i.displayName="Skeleton"; //# sourceMappingURL=skeleton.js.map