AaronPowell96 / sandpack-file-explorer

Enhanced File Explorer for Sandpack. Providing immense flexibility to Sandpack's capabilities.
https://www.npmjs.com/package/sandpack-file-explorer
MIT License
29 stars 8 forks source link

Feature: Rename files and folders #3

Open andrico-anima opened 7 months ago

andrico-anima commented 7 months ago

It would be great to add an option to allow renaming of a file or folder

This could be an option that could be enabled via a prop. that offers an "edit" icon that a user can click, which turns the file name into a text input.

You could also change the "X" button to instead be a button that opens a context menu that offers multiple options, like deleting a file, renaming a file, etc.

A third option would be to simply enable a keyboard shortcut. CodeSandbox has the shortcut mapped to "enter". A good start would be to mimic this behaviour.

What do you think?

heykvr commented 4 months ago

can i pick up this issue?