@bothub-chat/ui
Version:
Bothub UI Components
2 lines (1 loc) • 1.52 kB
JavaScript
import{styled as o,css as r,keyframes as l}from"styled-components";const e=o.span.withConfig({displayName:"styled__SkeletonStyled",componentId:"sc-kixyci-0"})(["display:inline-flex;flex-shrink:0;vertical-align:middle;width:",";height:",";background:",";cursor:progress;"," animation:",";overflow:hidden;"],(({$fullWidth:o,$width:r})=>o?"100%":"number"==typeof r||"string"==typeof r?`${r}px`:"var(--skeleton-width, 40px)"),(({$height:o})=>"number"==typeof o||"string"==typeof o?`${o}px`:"var(--skeleton-height, 40px)"),(({theme:o})=>o.colors.grayScale.gray1),(({$variant:o})=>{switch(o){case"rectangular":return r(["border-radius:0px;"]);case"circular":return r(["border-radius:50%;"]);default:return r(["border-radius:var(--skeleton-radius,4px);"])}}),(({theme:o,$opacity:e,$colors:a})=>r([""," 2s infinite forwards;"],(({theme:o,$opacity:r,$colors:e})=>{var a,i,t,n,d,c;return l(["0%{background:",";opacity:",";}85%{background:",";opacity:",";}100%{background:",";opacity:",";}"],null!==(a=null==e?void 0:e[0])&&void 0!==a?a:"light"===o.mode?o.colors.grayScale.gray2:o.colors.grayScale.gray5,null!==(i=null==r?void 0:r[0])&&void 0!==i?i:1,null!==(t=null==e?void 0:e[1])&&void 0!==t?t:"light"===o.mode?o.colors.grayScale.gray5:o.colors.grayScale.gray1,null!==(n=null==r?void 0:r[1])&&void 0!==n?n:1,null!==(d=null==e?void 0:e[0])&&void 0!==d?d:"light"===o.mode?o.colors.grayScale.gray2:o.colors.grayScale.gray5,null!==(c=null==r?void 0:r[0])&&void 0!==c?c:1)})({theme:o,$opacity:e,$colors:a}))));export{e as SkeletonStyled};