mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Make style editor inputs more obvious resemble inputs
This commit is contained in:
@@ -68,8 +68,12 @@ export default function AutoSizeInput({
|
||||
return;
|
||||
}
|
||||
|
||||
// Adding an extra pixel avoids a slight horizontal scroll when changing text selection/cursor.
|
||||
// Not sure why this is, but the old DevTools did a similar thing.
|
||||
const targetWidth = Math.ceil(scrollWidth) + 1;
|
||||
|
||||
if (inputRef.current !== null) {
|
||||
inputRef.current.style.width = `${scrollWidth}px`;
|
||||
inputRef.current.style.width = `${targetWidth}px`;
|
||||
}
|
||||
}, [value]);
|
||||
|
||||
|
||||
@@ -42,6 +42,12 @@
|
||||
|
||||
.Input {
|
||||
flex: 0 1 auto;
|
||||
padding: 1px;
|
||||
box-shadow: 0px 1px 3px transparent;
|
||||
}
|
||||
.Input:focus {
|
||||
color: var(--color-text);
|
||||
box-shadow: 0px 1px 3px var(--color-shadow);
|
||||
}
|
||||
|
||||
.Empty {
|
||||
|
||||
Reference in New Issue
Block a user