0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 20:33:51 +00:00

dynamic text input width to match characters

This commit is contained in:
Gazook89
2024-11-07 19:46:07 -06:00
parent 650ec04417
commit 28855d02a6
2 changed files with 2 additions and 1 deletions

View File

@@ -238,6 +238,7 @@ const ToolBar = ({ displayOptions, onDisplayOptionsChange, visiblePages, totalPa
onChange={(e)=>handlePageInput(e.target.value)}
onBlur={()=>scrollToPage(pageNum)}
onKeyDown={(e)=>e.key == 'Enter' && scrollToPage(pageNum)}
style={{ width: `${pageNum.length}ch` }}
/>
<span id='page-count' title='Total Page Count'>/ {totalPages}</span>
</div>

View File

@@ -140,7 +140,7 @@
// `.text-input` if generic to all range inputs, or `#page-input` if only for current page input
&#page-input {
width : 10ch;
min-width : 5ch;
margin-right : 1ch;
text-align : center;
}