Consolidate MenuListButton into TextButton (#1470)

This commit is contained in:
Keavon Chambers
2023-11-25 01:56:05 -08:00
committed by GitHub
parent 34c6c0431b
commit ab3410cffe
14 changed files with 141 additions and 138 deletions
@@ -169,8 +169,6 @@
}
input {
// text-align: center;
&:not(:focus).has-label {
text-align: right;
margin-left: 0;
@@ -202,6 +200,11 @@
textarea {
color: var(--color-8-uppergray);
}
input {
// Disables drag-selecting the text, since `user-select: none` doesn't work for input elements
pointer-events: none;
}
}
}
</style>
@@ -248,7 +248,7 @@
function onDragPointerDown(e: PointerEvent) {
// Only drag the number with left click (and when it's valid to do so)
if (e.button !== BUTTON_LEFT || mode !== "Increment" || value === undefined) return;
if (e.button !== BUTTON_LEFT || mode !== "Increment" || value === undefined || disabled) return;
// Don't drag the text value from is input element
e.preventDefault();
@@ -633,8 +633,8 @@
}
// Show the left-right arrow cursor when hovered over the draggable area
input[type="text"]:not(:focus),
label {
&:not(.disabled) input[type="text"]:not(:focus),
&:not(.disabled) label {
cursor: ew-resize;
}