UNPKG

@privy-io/react-auth

Version:

React client for the Privy Auth API

40 lines (33 loc) 1.1 kB
import{jsx as o}from"react/jsx-runtime";import{useState as r}from"react";import{styled as e}from"styled-components";const n=e=>{let[n,i]=r(!1);/*#__PURE__*/return o(t,{color:e.color,href:e.url,target:"_blank",rel:"noreferrer noopener",onClick:()=>{i(!0),setTimeout((()=>i(!1)),1500)},justOpened:n,children:e.text})};let t=e.a` display: flex; align-items: center; gap: 6px; && { margin: 8px 2px; font-size: 14px; color: ${o=>o.justOpened?"var(--privy-color-foreground)":o.color||"var(--privy-color-foreground-3)"}; font-weight: ${o=>o.justOpened?"medium":"normal"}; transition: color 350ms ease; :focus, :active { background-color: transparent; border: none; outline: none; box-shadow: none; } :hover { color: ${o=>o.justOpened?"var(--privy-color-foreground)":"var(--privy-color-foreground-2)"}; } :active { color: 'var(--privy-color-foreground)'; font-weight: medium; } @media (max-width: 440px) { margin: 12px 2px; } } svg { width: 14px; height: 14px; } `;export{n as O};