aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGalen Guyer <galen@galenguyer.com>2022-08-31 22:13:41 -0400
committerGalen Guyer <galen@galenguyer.com>2022-08-31 22:15:44 -0400
commit5ba9f8be32f9c9657d011cb92208832947c2e106 (patch)
tree969757baa089e155880aba8c8c35df4f7a78ed1c
parent66ca93931ad6b12a67f1bf29319471be1df4e7ca (diff)
Make TTL use dropdown instead of input
-rw-r--r--src/components/RecordModal.js20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/components/RecordModal.js b/src/components/RecordModal.js
index 1208378..50a5f9b 100644
--- a/src/components/RecordModal.js
+++ b/src/components/RecordModal.js
@@ -29,7 +29,7 @@ export default function RecordModal(props) {
<th style={{ width: '6em' }}>Type</th>
<th style={{ width: '18em' }}>Name</th>
<th style={{ width: '24em' }}>Content</th>
- <th style={{ width: '6em' }}>TTL</th>
+ <th style={{ width: '9em' }}>TTL</th>
</tr>
</thead>
<tbody>
@@ -76,17 +76,27 @@ export default function RecordModal(props) {
></Input>
</td>
<td>
- <Input
- rows={1}
+ <StyledSelect
onChange={(e) =>
setOpenRecord({
...openRecord,
ttl: parseInt(e.target.value),
})
}
- type="number"
defaultValue={openRecord.ttl}
- ></Input>
+ >
+ <option value="60">1 minute</option>
+ <option value="300">5 minutes</option>
+ <option value="600">10 minutes</option>
+ <option value="1800">30 minutes</option>
+ <option value="3600">1 hour</option>
+ <option value="10800">3 hours</option>
+ <option value="21600">6 hours</option>
+ <option value="43200">12 hours</option>
+ <option value="86400">1 day</option>
+ <option value="172800">2 days</option>
+ <option value="604800">1 week</option>
+ </StyledSelect>
</td>
</tr>
</tbody>