Skip to content

Commit 273fb12

Browse files
author
pseudocode88
committed
Convert all text input to number input
1 parent b35622c commit 273fb12

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

index.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ label {
114114
color: var(--content-secondary);
115115
}
116116

117-
input[type=text] {
117+
input[type=text],
118+
input[type=number] {
118119
border: 1px solid var(--int-border-default);
119120
color: var(--content-primary);
120121
border-radius: 4px;
@@ -125,7 +126,8 @@ input[type=text] {
125126
background-color: var(--int-surface-primary-default);
126127
}
127128

128-
input[type=text]:focus {
129+
input[type=text]:focus,
130+
input[type=number]:focus {
129131
outline: none;
130132
border: 1px solid var(--int-border-focus);
131133
}

index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,23 @@ <h2>Position Size Builder</h2>
4040
<div class="fr f-wrap-24">
4141
<div class="strech">
4242
<label>Stop Loss %</label>
43-
<input type="text" id="txt-sl" value="1" />
43+
<input type="number" step=".01" id="txt-sl" value="1" />
4444
</div>
4545

4646
<div class="strech">
4747
<label>Take Profit %</label>
48-
<input type="text" id="txt-tp" value="1" />
48+
<input type="number" step=".01" id="txt-tp" value="1" />
4949
</div>
5050

5151
<div class="strech">
5252
<label>Leverage</label>
53-
<input type="text" id="txt-lev" value="10" />
53+
<input type="number" step="1" id="txt-lev" value="10" />
5454
</div>
5555
</div>
5656

5757
<div class="strech">
5858
<label>Position Size</label>
59-
<input type="text" id="txt-ps" value="100" />
59+
<input type="number" step=".01" id="txt-ps" value="100" />
6060
</div>
6161

6262
</section>
@@ -154,28 +154,28 @@ <h2>Account Settings</h2>
154154
<div id="form-account-settings" class="fc f-wrap-24 hide FormAccountSettings">
155155
<div class="Settings__Capital">
156156
<label>Trading Capital</label>
157-
<input type="text" id="txt-capital" value="100" />
157+
<input type="number" step="1" id="txt-capital" value="100" />
158158
</div>
159159

160160
<div class="fr f-wrap-24">
161161
<div class="strech">
162162
<label>Risk per trade - Min%</label>
163-
<input type="text" id="txt-min-risk" value="3" placeholder="Min %" />
163+
<input type="number" step="1" id="txt-min-risk" value="3" placeholder="Min %" />
164164
</div>
165165
<div class="strech">
166166
<label>Risk per trade - Max%</label>
167-
<input type="text" id="txt-max-risk" value="5" placeholder="Max %" />
167+
<input type="number" step="1" id="txt-max-risk" value="5" placeholder="Max %" />
168168
</div>
169169
</div>
170170

171171
<div class="fr f-wrap-24">
172172
<div class="strech">
173173
<label>Maker Fee %</label>
174-
<input type="text" id="txt-maker-fee" value="0.02" placeholder="Min %" />
174+
<input type="number" step=".01" id="txt-maker-fee" value="0.02" placeholder="Min %" />
175175
</div>
176176
<div class="strech">
177177
<label>Taker Fee %</label>
178-
<input type="text" id="txt-taker-fee" value="0.05" placeholder="Max %" />
178+
<input type="number" step=".01" id="txt-taker-fee" value="0.05" placeholder="Max %" />
179179
</div>
180180
</div>
181181

0 commit comments

Comments
 (0)