add hovericons component

pull/4446/head
Joseph Izang 10 months ago
parent f43f09ab00
commit 2c28bbff48
  1. 12
      libs/remix-ui/workspace/src/lib/components/file-explorer-hovericons.tsx
  2. 5
      libs/remix-ui/workspace/src/lib/components/flat-tree.tsx

@ -4,13 +4,13 @@ import { FormattedMessage } from 'react-intl'
import { ROOT_PATH } from '../utils/constants'
export type FileHoverIconsProps = {
hover: boolean
isEditable: boolean
hover?: boolean
isEditable?: boolean
file: any
handleNewFolderOp: any
handleNewFileOp: any
renamePathOp: any
deletePathOp: any
handleNewFolderOp?: any
handleNewFileOp?: any
renamePathOp?: any
deletePathOp?: any
}
export function FileHoverIcons(props: FileHoverIconsProps) {

@ -7,6 +7,7 @@ import { FlatTreeItemInput } from './flat-tree-item-input';
import { FlatTreeDrop } from './flat-tree-drop';
import { getEventTarget } from '../utils/getEventTarget';
import { fileDecoration, FileDecorationIcons } from '@remix-ui/file-decorators';
import { FileHoverIcons } from './file-explorer-hovericons';
export default function useOnScreen(ref: RefObject<HTMLElement>) {
@ -209,7 +210,9 @@ export const FlatTree = (props: FlatTreeProps) => {
{file.name}
</div>
{getFileStateIcons(file)}
<div className="d-flex flex-row gap-1">
<div><FileHoverIcons file={file} /></div>{getFileStateIcons(file)}
</div>
</>
}
</div>

Loading…
Cancel
Save