UNPKG

@privy-io/react-auth

Version:

React client for the Privy Auth API

2 lines (1 loc) 1.25 kB
"use strict";var e=require("react/jsx-runtime"),r=require("styled-components");let t=({data:r})=>{let t=r=>"object"==typeof r&&null!==r?/*#__PURE__*/e.jsx(i,{children:Object.entries(r).map((([r,s])=>/*#__PURE__*/e.jsxs("li",{children:[/*#__PURE__*/e.jsxs("strong",{children:[r,":"]})," ",t(s)]},r)))}):/*#__PURE__*/e.jsx("span",{children:String(r)});/*#__PURE__*/return e.jsx("div",{children:t(r)})};const s=/*#__PURE__*/r.styled.div.withConfig({displayName:"Message",componentId:"sc-70ec2a4f-0"})(["margin-top:1.5rem;background-color:var(--privy-color-background-2);border-radius:var(--privy-border-radius-md);padding:12px;text-align:left;max-height:310px;overflow:scroll;white-space:pre-wrap;width:100%;font-size:0.875rem;font-weight:400;color:var(--privy-color-foreground);line-height:1.5;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]);let i=/*#__PURE__*/r.styled.ul.withConfig({displayName:"MessageList",componentId:"sc-70ec2a4f-1"})(["margin-left:12px !important;white-space:nowrap;&:first-child{margin-left:0 !important;}strong{font-weight:500 !important;}"]);exports.DisplayJsonTree=({data:r,className:i})=>/*#__PURE__*/e.jsx(s,{className:i,children:/*#__PURE__*/e.jsx(t,{data:r})}),exports.Message=s;