-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into r…
…ender
- Loading branch information
Showing
31 changed files
with
948 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...d/src/components/Modals/MangeWorkspace/Documents/Directory/FolderSelectionPopup/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { middleTruncate } from "@/utils/directories"; | ||
|
||
export default function FolderSelectionPopup({ folders, onSelect, onClose }) { | ||
const handleFolderSelect = (folder) => { | ||
onSelect(folder); | ||
onClose(); | ||
}; | ||
|
||
return ( | ||
<div className="absolute bottom-full left-0 mb-2 bg-white rounded-lg shadow-lg"> | ||
<ul> | ||
{folders.map((folder) => ( | ||
<li | ||
key={folder.name} | ||
onClick={() => handleFolderSelect(folder)} | ||
className="px-4 py-2 text-xs text-gray-700 hover:bg-gray-200 rounded-lg cursor-pointer whitespace-nowrap" | ||
> | ||
{middleTruncate(folder.name, 25)} | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.