mirror of
https://github.com/docmost/docmost.git
synced 2026-08-30 02:25:01 +08:00
fix(base): render view-tab rename as an inline pill so the tab band height stays put
This commit is contained in:
@@ -288,15 +288,35 @@ function ViewTab({
|
|||||||
|
|
||||||
if (isEditing) {
|
if (isEditing) {
|
||||||
return (
|
return (
|
||||||
<TextInput
|
<div
|
||||||
size="xs"
|
style={{
|
||||||
w={120}
|
display: "inline-flex",
|
||||||
value={editingName}
|
alignItems: "center",
|
||||||
onChange={(e) => onRenameChange(e.currentTarget.value)}
|
padding: "1px 10px",
|
||||||
onBlur={onRenameCommit}
|
border: "1px solid var(--mantine-color-default-border)",
|
||||||
onKeyDown={onRenameKeyDown}
|
borderRadius: "var(--mantine-radius-xl)",
|
||||||
autoFocus
|
}}
|
||||||
/>
|
>
|
||||||
|
<TextInput
|
||||||
|
variant="unstyled"
|
||||||
|
size="xs"
|
||||||
|
value={editingName}
|
||||||
|
onChange={(e) => onRenameChange(e.currentTarget.value)}
|
||||||
|
onBlur={onRenameCommit}
|
||||||
|
onKeyDown={onRenameKeyDown}
|
||||||
|
autoFocus
|
||||||
|
styles={{
|
||||||
|
input: {
|
||||||
|
height: "auto",
|
||||||
|
minHeight: 0,
|
||||||
|
padding: 0,
|
||||||
|
width: 100,
|
||||||
|
fontSize: "var(--mantine-font-size-sm)",
|
||||||
|
lineHeight: 1.2,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user