refactor menu

pull/5370/head
lianahus 1 year ago committed by Aniket
parent ae2f71e4f9
commit f6c359015e
  1. 2
      libs/remix-ui/workspace/src/lib/components/file-explorer-menu.tsx
  2. 18
      libs/remix-ui/workspace/src/lib/components/file-explorer.tsx

@ -151,7 +151,7 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
state.actions[action]()
}
}}
className={'newFile ' + icon + ' px-1 remixui_newFile'}
className={'newFile ' + icon + ' pr-2 pl-1 remixui_newFile'}
key={`${action}-${title}-${index}`}
></label>
</CustomTooltip>

@ -319,10 +319,13 @@ export const FileExplorer = (props: FileExplorerProps) => {
<Drag onFileMoved={handleFileMove} onFolderMoved={handleFolderMove}>
<div ref={treeRef} tabIndex={0} style={{outline: 'none'}}>
<TreeView id="treeView">
<TreeViewItem
id="treeViewItem"
controlBehaviour={true}
label={
<li key={`treeViewLiMenu`} data-id={`treeViewLiMenu`} className="li_tv">
<div
key={`treeViewDivMenu`}
data-id={`treeViewDivMenu`}
className={`d-flex flex-row align-items-center`}
>
<span className="w-100 pl-2">
<div onClick={handleFileExplorerMenuClick}>
<FileExplorerMenu
title={''}
@ -334,9 +337,9 @@ export const FileExplorer = (props: FileExplorerProps) => {
uploadFolder={uploadFolder}
/>
</div>
}
expand={true}
>
</span>
</div>
</li>
<div className="pb-4 mb-4">
<TreeView id="treeViewMenu">
{files[ROOT_PATH] &&
@ -361,7 +364,6 @@ export const FileExplorer = (props: FileExplorerProps) => {
))}
</TreeView>
</div>
</TreeViewItem>
</TreeView>
</div>
</Drag>

Loading…
Cancel
Save