UNPKG

@privy-io/react-auth

Version:

React client for the Privy Auth API

2 lines (1 loc) 986 B
"use strict";var e=require("react/jsx-runtime"),r=require("./Button-Bm_Ft0Dw.js"),n=require("./Screen-D9Tvi297.js");exports.ScreenLayout=({primaryCta:t,secondaryCta:l,helpText:s,watermark:a=!0,children:c,...i})=>{let u=t||l?/*#__PURE__*/e.jsxs(e.Fragment,{children:[t&&(()=>{let{label:n,...l}=t,s=l.variant||"primary";/*#__PURE__*/return e.jsx(r.Button,{...l,variant:s,style:{width:"100%",...l.style},children:n})})(),l&&(()=>{let{label:n,...t}=l,s=t.variant||"secondary";/*#__PURE__*/return e.jsx(r.Button,{...t,variant:s,style:{width:"100%",...t.style},children:n})})()]}):null;/*#__PURE__*/return e.jsxs(n.Screen,{id:i.id,className:i.className,children:[/*#__PURE__*/e.jsx(n.Screen.Header,{...i}),c?/*#__PURE__*/e.jsx(n.Screen.Body,{children:c}):null,s||u||a?/*#__PURE__*/e.jsxs(n.Screen.Footer,{children:[s?/*#__PURE__*/e.jsx(n.Screen.HelpText,{children:s}):null,u?/*#__PURE__*/e.jsx(n.Screen.Actions,{children:u}):null,a?/*#__PURE__*/e.jsx(n.Screen.Watermark,{}):null]}):null]})};