Browse Source

Merge pull request #583 from mrfelton/fix/custom-connection-help-text

fix(onboarding): improve custom connection form field help text
renovate/lint-staged-8.x
Ben Woosley 7 years ago
committed by GitHub
parent
commit
e96d2cd4e6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      app/components/Onboarding/ConnectionDetails.js
  2. 27
      app/components/Onboarding/ConnectionDetails.scss

10
app/components/Onboarding/ConnectionDetails.js

@ -19,12 +19,14 @@ const ConnectionDetails = ({
<input <input
type="text" type="text"
id="connectionHost" id="connectionHost"
placeholder="Hostname / Port of the Lnd gRPC interface"
className={`${styles.host} ${startLndHostError && styles.error}`} className={`${styles.host} ${startLndHostError && styles.error}`}
ref={input => input} ref={input => input}
value={connectionHost} value={connectionHost}
onChange={event => setConnectionHost(event.target.value)} onChange={event => setConnectionHost(event.target.value)}
/> />
<p className={styles.description}>
Hostname and port of the Lnd gRPC interface. Example: localhost:10009
</p>
<p className={`${startLndHostError && styles.visible} ${styles.errorMessage}`}> <p className={`${startLndHostError && styles.visible} ${styles.errorMessage}`}>
{startLndHostError} {startLndHostError}
</p> </p>
@ -34,12 +36,12 @@ const ConnectionDetails = ({
<input <input
type="text" type="text"
id="connectionCert" id="connectionCert"
placeholder="Path to the lnd tls cert"
className={`${styles.cert} ${startLndCertError && styles.error}`} className={`${styles.cert} ${startLndCertError && styles.error}`}
ref={input => input} ref={input => input}
value={connectionCert} value={connectionCert}
onChange={event => setConnectionCert(event.target.value)} onChange={event => setConnectionCert(event.target.value)}
/> />
<p className={styles.description}>Path to the lnd tls cert. Example: /path/to/tls.cert</p>
<p className={`${startLndCertError && styles.visible} ${styles.errorMessage}`}> <p className={`${startLndCertError && styles.visible} ${styles.errorMessage}`}>
{startLndCertError} {startLndCertError}
</p> </p>
@ -49,12 +51,14 @@ const ConnectionDetails = ({
<input <input
type="text" type="text"
id="connectionMacaroon" id="connectionMacaroon"
placeholder="Path to the lnd macaroon file"
className={`${styles.macaroon} ${startLndMacaroonError && styles.error}`} className={`${styles.macaroon} ${startLndMacaroonError && styles.error}`}
ref={input => input} ref={input => input}
value={connectionMacaroon} value={connectionMacaroon}
onChange={event => setConnectionMacaroon(event.target.value)} onChange={event => setConnectionMacaroon(event.target.value)}
/> />
<p className={styles.description}>
Path to the lnd macaroon file. Example: /path/to/admin.macaroon
</p>
<p className={`${startLndMacaroonError && styles.visible} ${styles.errorMessage}`}> <p className={`${startLndMacaroonError && styles.visible} ${styles.errorMessage}`}>
{startLndMacaroonError} {startLndMacaroonError}
</p> </p>

27
app/components/Onboarding/ConnectionDetails.scss

@ -4,15 +4,14 @@
color: $white; color: $white;
.input { .input {
margin-bottom: 15px; margin-bottom: 10px;
} }
label { label {
display: block; display: block;
font-size: 12px; font-size: 14px;
line-height: 14px; line-height: 18px;
padding-bottom: 5px; margin-bottom: 5px;
min-height: 14px;
} }
input { input {
@ -20,13 +19,14 @@
outline: none; outline: none;
border: 1px solid #404040; border: 1px solid #404040;
border-radius: 4px; border-radius: 4px;
padding: 10px; padding: 8px;
color: $gold; color: $gold;
-webkit-text-fill-color: $white; -webkit-text-fill-color: $white;
font-size: 18px; font-size: 18px;
font-weight: 400; font-weight: 400;
width: 600px; width: 600px;
transition: all 0.25s; transition: all 0.25s;
margin-bottom: 5px;
&.error { &.error {
border: 1px solid $red; border: 1px solid $red;
@ -38,15 +38,20 @@
-webkit-text-fill-color: initial; -webkit-text-fill-color: initial;
} }
.description {
font-size: 12px;
line-height: 18px;
opacity: 0.5;
}
.errorMessage { .errorMessage {
margin-top: 10px; font-size: 12px;
line-height: 18px;
color: $red; color: $red;
height: 10px; display: none;
visibility: hidden;
font-size: 10px;
&.visible { &.visible {
visibility: visible; display: block;
} }
} }
} }

Loading…
Cancel
Save