add hovericons component

pull/5370/head
Joseph Izang 10 months ago
parent 5c639e4af3
commit 140b753fb8
  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