@privy-io/react-auth
Version:
React client for the Privy Auth API
33 lines (29 loc) • 1.15 kB
JavaScript
;var e=require("react/jsx-runtime"),r=require("styled-components");const t=({title:r,description:t,children:i,...s})=>
/*#__PURE__*/e.jsx(n,{...s,children:/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx("h3",{children:r}),"string"==typeof t?/*#__PURE__*/e.jsx("p",{children:t}):t,i]})});r.styled(t)`
margin-bottom: 24px;
`;let n=r.styled.div`
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
text-align: left;
gap: 8px;
width: 100%;
margin-bottom: 24px;
&& h3 {
font-size: 17px;
color: var(--privy-color-foreground);
}
/* Sugar assuming children are paragraphs. Otherwise, handling styling on your own */
&& p {
color: var(--privy-color-foreground-2);
font-size: 14px;
}
`,i=r.styled(n)`
align-items: center;
text-align: center;
gap: 16px;
h3 {
margin-bottom: 24px;
}
`;exports.CenteredScreenHeader=({title:r,description:t,icon:n,children:s,...l})=>/*#__PURE__*/e.jsxs(i,{...l,children:[n||null,/*#__PURE__*/e.jsx("h3",{children:r}),t&&"string"==typeof t?/*#__PURE__*/e.jsx("p",{children:t}):t,s]}),exports.ScreenHeader=t;