Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Custom new file icon and new folder icon #65

Open
NicolaLovo opened this issue Jun 18, 2022 · 3 comments
Open

Add Custom new file icon and new folder icon #65

NicolaLovo opened this issue Jun 18, 2022 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@NicolaLovo
Copy link

I would like to customize the new file icon and the folder icon, so that when I press them I can show my dialog window, instead than creating the default file named "new file" and the default folder.
Also, it would be great if the event state contains the path of the new file/folder created.
Is that possible?

@shunjizhan
Copy link
Owner

shunjizhan commented Jun 19, 2022

I would like to customize the new file icon and the folder icon

I think something like this should work?

  const FileIcon = ({ onClick: defaultOnClick, nodeData }) => {
    const handleClick = () => {   
      showDialogWindow();    // depends on how the dialog window is implemented
    };

    return <FaBitcoin onClick={ handleClick } />;
  };

@shunjizhan
Copy link
Owner

Also, it would be great if the event state contains the path of the new file/folder created.

Thanks for the suggestion, will add it as a enhancement in later versions

@shunjizhan shunjizhan added enhancement New feature or request question Further information is requested labels Jun 19, 2022
@NicolaLovo
Copy link
Author

I would like to customize the new file icon and the folder icon

I think something like this should work?

  const FileIcon = ({ onClick: defaultOnClick, nodeData }) => {
    const handleClick = () => {   
      showDialogWindow();    // depends on how the dialog window is implemented
    };

    return <FaBitcoin onClick={ handleClick } />;
  };

I explained myself badly here, I want to customize the "New file" and "New folder" icon that appears when you click on a folder:
image
Is it possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants