Skip to content

Commit

Permalink
Fix css
Browse files Browse the repository at this point in the history
  • Loading branch information
okdonga committed Jan 22, 2022
1 parent b44141f commit 2c65356
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 40 deletions.
34 changes: 14 additions & 20 deletions frontend/src/components/ConnectWallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,22 @@ import { NetworkErrorMessage } from "./NetworkErrorMessage";

export function ConnectWallet({ connectWallet, networkError, dismiss }) {
return (
<div className="container">
<div className="row justify-content-md-center">
<div className="col-12 text-center">
{/* Metamask network should be set to Localhost:8545. */}
{networkError && (
<NetworkErrorMessage
message={networkError}
dismiss={dismiss}
/>
)}
</div>
<div className="col-6 p-4 text-center">
<main>
<div>
{/* Metamask network should be set to Localhost:8545. */}
{networkError && (
<NetworkErrorMessage message={networkError} dismiss={dismiss} />
)}
</div>
<section>
<header>
<p>Please connect to your wallet.</p>
<button
className="btn btn-warning"
type="button"
onClick={connectWallet}
>
<br />
<button type="button" onClick={connectWallet}>
Connect Wallet
</button>
</div>
</div>
</div>
</header>
</section>
</main>
);
}
15 changes: 15 additions & 0 deletions frontend/src/components/Diet/Diet.css
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,18 @@ small {
color: var(--surface1);
fill: var(--surface3);
}

.left-align {
justify-content: flex-start;
}

.alert {
line-height: var(--space-md);
background: var(--surface4);
border-radius: var(--space-sm);
padding: var(--space-xs) var(--space-md);
}

.alert__close {
margin-inline-start: var(--space-sm);
}
4 changes: 2 additions & 2 deletions frontend/src/components/NetworkErrorMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from "react";

export function NetworkErrorMessage({ message, dismiss }) {
return (
<div className="alert alert-danger" role="alert">
<div role="alert" className="alert">
{message}
<button
type="button"
className="close"
className="alert__close"
data-dismiss="alert"
aria-label="Close"
onClick={dismiss}
Expand Down
34 changes: 16 additions & 18 deletions frontend/src/components/NoWalletDetected.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@ import React from "react";

export function NoWalletDetected() {
return (
<div className="container">
<div className="row justify-content-md-center">
<div className="col-6 p-4 text-center">
<p>
No Ethereum wallet was detected. <br />
Please install{" "}
<a
href="http://metamask.io"
target="_blank"
rel="noopener noreferrer"
>
MetaMask
</a>
.
</p>
</div>
</div>
</div>
<main>
<section>
<p>
No Ethereum wallet was detected. <br />
Please install{" "}
<a
href="http://metamask.io"
target="_blank"
rel="noopener noreferrer"
>
MetaMask
</a>
.
</p>
</section>
</main>
);
}
11 changes: 11 additions & 0 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,14 @@ h3 {
.left-align {
justify-content: flex-start;
}

.alert {
line-height: var(--space-md);
background: var(--surface4);
border-radius: var(--space-sm);
padding: var(--space-xs) var(--space-md);
}

.alert__close {
margin-inline-start: var(--space-sm);
}

0 comments on commit 2c65356

Please sign in to comment.