Skip to content

Commit 4c7b7cf

Browse files
committed
ui update
1 parent 3531e2c commit 4c7b7cf

File tree

7 files changed

+23
-8
lines changed

7 files changed

+23
-8
lines changed

src/components/cards/govActions/dRepRegistrationPanel.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,16 @@ const DRepRegistrationPanel = (props) => {
4949
return (
5050
<GovToolsPanel {...panelProps}>
5151
<InputWithLabel
52-
inputName="DRep ID (Bech32 or Hex encoded)"
52+
inputName="DRep ID"
53+
helpText="Bech32 or Hex encoded"
5354
inputValue={dRepIdInputValue}
5455
onChangeFunction={(event) => {
5556
setDRepIdInputValue(event.target.value)
5657
}}
5758
/>
5859
<InputWithLabel
59-
inputName="DRep Registration Deposit Amount (lovelaces)"
60+
inputName="DRep Registration Deposit Amount"
61+
helpText="This should be align with current protocol parameters (in lovelace)"
6062
inputValue={depositAmount}
6163
onChangeFunction={(event) => {
6264
setDepositAmount(event.target.value)

src/components/cards/govActions/dRepRetirementPanel.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,16 @@ const DRepRetirementPanel = (props) => {
3535
return (
3636
<GovToolsPanel {...panelProps}>
3737
<InputWithLabel
38-
inputName="DRep ID (Bech32 or Hex encoded)"
38+
inputName="DRep ID"
39+
helpText="Bech32 or Hex encoded"
3940
inputValue={dRepIdInputValue}
4041
onChangeFunction={(event) => {
4142
setDRepIdInputValue(event.target.value)
4243
}}
4344
/>
4445
<InputWithLabel
45-
inputName="DRep Registration Deposit Refund Amount (lovelaces)"
46+
inputName="DRep Registration Deposit Refund Amount"
47+
helpText="This should be align with how much was paid during registration (in lovelace)"
4648
inputValue={depositRefundAmount}
4749
onChangeFunction={(event) => {
4850
setDepositRefundAmount(event.target.value)

src/components/cards/govActions/dRepUpdatePanel.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ const DRepUpdatePanel = (props) => {
5050
return (
5151
<GovToolsPanel {...panelProps}>
5252
<InputWithLabel
53-
inputName="DRep ID (Bech32 or Hex encoded)"
53+
inputName="DRep ID"
54+
helpText="Bech32 or Hex encoded"
5455
inputValue={dRepIdInputValue}
5556
onChangeFunction={(event) => {
5657
setDRepIdInputValue(event.target.value)

src/components/cards/govActions/regStakeKeyPanel.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ const RegisterStakeKeyPanel = (props) => {
6464
}}
6565
/>
6666
<InputWithLabel
67-
inputName="Stake Key Deposit Amount (lovelaces, this should align with current protocol parameters)"
67+
inputName="Stake Key Deposit Amount (lovelaces)"
68+
helpText="This should align with current protocol parameters"
6869
inputValue={stakeDepositAmount}
6970
onChangeFunction={(event) => {
7071
setStakeDepositAmount(event.target.value)

src/components/cards/govActions/voteDelegationPanel.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ const VoteDelegationPanel = (props) => {
7171
return (
7272
<GovToolsPanel {...panelProps}>
7373
<InputWithLabel
74-
inputName="Target of vote delegation | abstain | no confidence"
74+
inputName="Target of vote delegation"
75+
helpText="DRep ID | abstain | no confidence"
7576
inputValue={dRepIdInputValue}
7677
onChangeFunction={(event) => {
7778
setDRepIdInputValue(event.target.value)

src/components/cards/govActions/votePanel.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const VotePanel = (props) => {
7272
<GovToolsPanel {...panelProps}>
7373
<InputWithLabel
7474
inputName="DRep ID"
75+
helpText="Bech32 or Hex encoded"
7576
inputValue={dRepIdInputValue}
7677
onChangeFunction={(event) => {
7778
setDRepIdInputValue(event.target.value)

src/components/inputWithLabel.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react'
22
import {CommonStyles, ModalWindowContent} from './ui-constants'
33

44
const InputWithLabel = (props) => {
5-
const {inputName, inputValue, onChangeFunction} = props
5+
const {inputName, inputValue, onChangeFunction, helpText} = props
66

77
const nftInputID = inputValue.split(' ').join('')
88

@@ -18,6 +18,13 @@ const InputWithLabel = (props) => {
1818
value={inputValue}
1919
onChange={onChangeFunction}
2020
/>
21+
{helpText ? (
22+
<label htmlFor={'input-' + nftInputID} className="block mb-1 ml-1 text-sm font-light text-gray-300">
23+
{helpText}
24+
</label>
25+
) : (
26+
<></>
27+
)}
2128
</div>
2229
)
2330
}

0 commit comments

Comments
 (0)