@particle-network/authkit
Version:
Auth Core provides MPC (Multi-Party Computation)-based threshold signatures.
61 lines (60 loc) • 1.82 kB
JavaScript
"use client";
import{a as h}from"./chunk-BM7ICTT2.mjs";import{h as s,n as l,o as p}from"./chunk-H6TXMQRA.mjs";import t from"react";var m=`.p-auth-header {
position: sticky;
flex-shrink: 0;
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);
}
.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: 24px;
}
.p-auth-header .middle {
flex: 1;
}
.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%;
}
`;var x=o=>{var r,d;let{children:f,leftContent:a,rightContent:c,onBack:e}=o,{displayBackBtn:i=!1}=o,g=p(),{customRouter:n}=l();return e&&(i=!0),(a||((d=(r=n==null?void 0:n.history)==null?void 0:r.length)!=null?d:0)<=1)&&(i=!1),t.createElement(t.Fragment,null,t.createElement("style",null,s(m)),t.createElement("div",{className:"p-auth-header"},t.createElement("div",{className:"left"},t.createElement(t.Fragment,null,i&&t.createElement(h,{className:"header-back-btn",name:"circle_back",onClick:()=>{e?e():g(-1)}}),a)),t.createElement("div",{className:"middle"},f),t.createElement("div",{className:"right"},c)))},C=x;export{C as a};