@particle-network/authkit
Version:
Auth Core provides MPC (Multi-Party Computation)-based threshold signatures.
64 lines (63 loc) • 1.92 kB
JavaScript
"use client";
import{b as s}from"./chunk-GKIRU5P2.mjs";import{ra as l,sa as p}from"./chunk-45SUOK7A.mjs";import t from"react";var h=`.p-auth-header {
position: sticky;
z-index: 99;
top: 0;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
min-height: 60px;
font-weight: 500;
font-size: 18px;
text-align: center;
color: var(--text-color);
background-color: var(--theme-background-color);
opacity: 0.97;
}
.p-auth-header .left {
position: absolute;
left: 0;
min-width: 60px;
height: 100%;
}
.p-auth-header .left .header-back-btn {
position: absolute;
z-index: 100;
top: 16px;
left: 16px;
font-size: 28px;
}
.p-auth-header .middle .info-request {
position: initial;
width: auto;
}
.p-auth-header .middle .info-title {
padding-top: 0;
margin-top: 4px;
}
.p-auth-header .middle .info-address {
justify-content: center;
align-items: center;
width: 140px;
padding-top: 2px;
margin: auto;
margin-top: 10px;
text-align: center;
}
.p-auth-header .middle .info-address .copy-icon {
position: relative;
top: 1px;
}
.p-auth-header .right {
position: absolute;
right: 0;
min-width: 60px;
height: 100%;
}
@media (min-width: 600px) {
.p-auth-header {
width: calc(100 * var(--vw));
}
}
`;var g=o=>{var d,r;let{children:c,leftContent:n,rightContent:m,onBack:e}=o,{displayBackBtn:i=!1}=o,f=p(),{customRouter:a}=l();return e&&(i=!0),(n||((r=(d=a==null?void 0:a.history)==null?void 0:d.length)!=null?r:0)<=1)&&(i=!1),t.createElement("div",{className:"width-100"},t.createElement("style",null,h),t.createElement("div",{className:"p-auth-header"},t.createElement("div",{className:"left"},t.createElement(t.Fragment,null,i&&t.createElement(s,{className:"header-back-btn",name:"circle_back",onClick:()=>{e?e():f(-1)}}),n)),t.createElement("div",{className:"middle"},c),t.createElement("div",{className:"right"},m)))},w=g;export{w as a};