UNPKG

@frank-auth/react

Version:

Flexible and customizable React UI components for Frank Authentication

4 lines (3 loc) 810 B
'use client'; "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");require("@emotion/styled");const a=require("../../../ui/button/button.cjs"),R=require("@heroicons/react/24/outline"),h=require("../../common/error-boundary.cjs"),B=h.withErrorBoundary(function({onResend:s,disabled:u=!1,remainingTime:n=0,attempt:e=0,maxAttempts:r=3,className:c,size:d="md",radius:i="md"}){const o=n===0&&e<r,l=r-e;return t.jsx(a.Button,{color:"primary",variant:"light",size:d,radius:i,onClick:s,disabled:u||!o,className:c,startContent:o?t.jsx(R.ArrowPathIcon,{className:"h-3 w-3"}):void 0,children:n>0?`Resend in ${n}s`:e>=r?"Max attempts reached":`Resend${e>0?` (${l} left)`:""}`})});exports.ResendEmailButton=B; //# sourceMappingURL=resend-email-button.cjs.map