UNPKG

@radix-ui/themes

Version:

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

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