1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

Disconnect button (#293)

* disconnect button

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>

* styling

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
This commit is contained in:
mihaisc 2021-01-13 12:20:11 +02:00 committed by GitHub
parent d1523a9065
commit ff34e263ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 13 deletions

View File

@ -1,5 +1,6 @@
.details {
padding: calc(var(--spacer) / 4);
padding-right: calc(var(--spacer) / 2);
min-width: 17rem;
}
@ -27,9 +28,28 @@
border-top: 1px solid var(--border-color);
margin-top: calc(var(--spacer) / 2);
padding-top: calc(var(--spacer) / 2);
display: flex;
justify-content: space-between;
align-items: center;
font-size: var(--font-size-small);
color: var(--color-secondary);
display: flex;
justify-content: space-between;
}
.actions span {
display: block;
}
.actions p {
margin: 0;
}
.actions button,
.actions button:hover {
display: block;
font-size: var(--font-size-mini);
margin-top: calc(var(--spacer) / 4);
text-align: left;
}
.actions button:first-child {
margin-top: calc(var(--spacer) / 8);
}

View File

@ -27,6 +27,7 @@ export default function Details(): ReactElement {
<li className={styles.actions}>
<span title="Connected provider">{getInjectedProviderName()}</span>
<p>
<Button
style="text"
size="small"
@ -37,6 +38,17 @@ export default function Details(): ReactElement {
>
Switch Wallet
</Button>
<Button
style="text"
size="small"
onClick={() => {
logout()
location.reload()
}}
>
Disconnect
</Button>
</p>
</li>
</ul>
<Web3Feedback />