diff --git a/src/components/folder-tree/FolderNameInput.tsx b/src/components/folder-tree/FolderNameInput.tsx index 7ca03b13..debeda29 100644 --- a/src/components/folder-tree/FolderNameInput.tsx +++ b/src/components/folder-tree/FolderNameInput.tsx @@ -6,6 +6,7 @@ interface FolderNameInputProps { ariaLabel: string initialValue: string placeholder: string + leftInset?: number selectTextOnFocus?: boolean submitOnBlur?: boolean testId: string @@ -17,6 +18,7 @@ export function FolderNameInput({ ariaLabel, initialValue, placeholder, + leftInset = 16, selectTextOnFocus = false, submitOnBlur = false, testId, @@ -45,8 +47,8 @@ export function FolderNameInput({ }, [onSubmit, value]) return ( -
- +
+ void onRenameFolder: (folderPath: string, nextName: string) => Promise | boolean }) { return ( -
+
{ onSelect() onOpenMenu(node, event) @@ -101,7 +106,9 @@ function FolderItemRow({ onToggle={() => onToggle(node.path)} /> { @@ -243,9 +259,9 @@ function FolderSelectButton({ data-testid={`folder-row:${node.path}`} > {isSelected || isExpanded ? ( - + ) : ( - + )} {node.name} @@ -314,14 +330,16 @@ export const FolderTreeRow = memo(function FolderTreeRow({ const isExpanded = expanded[node.path] ?? false const isRenaming = renamingFolderPath === node.path const isSelected = selection.kind === 'folder' && selection.path === node.path - const indentation = 16 + depth * 16 + const depthIndent = depth * 16 + const contentInset = 16 const noteRetargeting = useNoteRetargetingContext() const selectFolder = useCallback(() => { onSelect({ kind: 'folder', path: node.path }) }, [node.path, onSelect]) const row = ( {isRenaming && onRenameFolder && onCancelRenameFolder ? (