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' import { ROOT_PATH } from '../utils/constants'
export type FileHoverIconsProps = { export type FileHoverIconsProps = {
hover: boolean hover?: boolean
isEditable: boolean isEditable?: boolean
file: any file: any
handleNewFolderOp: any handleNewFolderOp?: any
handleNewFileOp: any handleNewFileOp?: any
renamePathOp: any renamePathOp?: any
deletePathOp: any deletePathOp?: any
} }
export function FileHoverIcons(props: FileHoverIconsProps) { export function FileHoverIcons(props: FileHoverIconsProps) {

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

Loading…
Cancel
Save