@privy-io/react-auth
Version:
React client for the Privy Auth API
35 lines (30 loc) • 1.28 kB
JavaScript
;var r=require("react/jsx-runtime"),e=require("styled-components");let t=({data:e})=>{let t=e=>"object"==typeof e&&null!==e?/*#__PURE__*/r.jsx(o,{children:Object.entries(e).map((([e,i])=>/*#__PURE__*/r.jsxs("li",{children:[/*#__PURE__*/r.jsxs("strong",{children:[e,":"]})," ",t(i)]},e)))}):/*#__PURE__*/r.jsx("span",{children:String(e)});/*#__PURE__*/return r.jsx("div",{children:t(e)})};const i=e.styled.div`
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;
// hide the scrollbars
-ms-overflow-style: none; /* Internet Explorer 10+ */
scrollbar-width: none; /* Firefox */
&::-webkit-scrollbar {
display: none; /* Safari and Chrome */
}
`;let o=e.styled.ul`
margin-left: 12px !important;
white-space: nowrap;
&:first-child {
margin-left: 0 !important;
}
strong {
font-weight: 500 !important;
}
`;exports.DisplayJsonTree=({data:e,className:o})=>/*#__PURE__*/r.jsx(i,{className:o,children:/*#__PURE__*/r.jsx(t,{data:e})}),exports.Message=i;