UNPKG

@privy-io/react-auth

Version:

React client for the Privy Auth API

2 lines (1 loc) 1.08 kB
import{jsx as r}from"react/jsx-runtime";import{styled as o,css as i,keyframes as e}from"styled-components";import{L as n}from"./LoadingSkeleton-CHdaq3pb.mjs";const l=({children:o,color:i,isLoading:e,isPulsing:n,...l})=>/*#__PURE__*/r(a,{$color:i,$isLoading:e,$isPulsing:n,...l,children:o});let a=/*#__PURE__*/o.span.withConfig({displayName:"StyledSpan",componentId:"sc-80725f4-0"})(["padding:0.25rem;font-size:0.75rem;font-weight:500;line-height:1rem;border-radius:var(--privy-border-radius-xs);display:flex;align-items:center;"," ",""],(r=>{let o,n;"green"===r.$color&&(o="var(--privy-color-success-dark)",n="var(--privy-color-success-light)"),"red"===r.$color&&(o="var(--privy-color-error)",n="var(--privy-color-error-light)"),"gray"===r.$color&&(o="var(--privy-color-foreground-2)",n="var(--privy-color-background-2)");let l=/*#__PURE__*/e(["from,to{background-color:",";}50%{background-color:rgba(",",0.8);}"],n,n);/*#__PURE__*/return i(["color:",";background-color:",";",";"],o,n,r.$isPulsing&&/*#__PURE__*/i(["animation:"," 3s linear infinite;"],l))}),n);export{l as C};