|
|
@ -2,7 +2,6 @@ |
|
|
|
import { fileDecoration } from '@remix-ui/file-decorators' |
|
|
|
import { fileDecoration } from '@remix-ui/file-decorators' |
|
|
|
import React, { useEffect, useRef, useState } from 'react' |
|
|
|
import React, { useEffect, useRef, useState } from 'react' |
|
|
|
import { FileType } from '../types' |
|
|
|
import { FileType } from '../types' |
|
|
|
import { CustomTooltip } from '@remix-ui/helper' |
|
|
|
|
|
|
|
export interface FileLabelProps { |
|
|
|
export interface FileLabelProps { |
|
|
|
file: FileType, |
|
|
|
file: FileType, |
|
|
|
focusEdit: { |
|
|
|
focusEdit: { |
|
|
@ -70,19 +69,12 @@ export const FileLabel = (props: FileLabelProps) => { |
|
|
|
onKeyDown={handleEditInput} |
|
|
|
onKeyDown={handleEditInput} |
|
|
|
onBlur={handleEditBlur} |
|
|
|
onBlur={handleEditBlur} |
|
|
|
> |
|
|
|
> |
|
|
|
<CustomTooltip |
|
|
|
<span |
|
|
|
placement={"right"} |
|
|
|
className={`text-nowrap remixui_label ${fileStateClasses} ` + (file.isDirectory ? 'folder' : 'remixui_leaf')} |
|
|
|
tooltipClasses="text-wrap" |
|
|
|
data-path={file.path} |
|
|
|
tooltipId={`remixFEItemTooltip${file.path}`} |
|
|
|
|
|
|
|
tooltipText={`${file.path}`} |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<span |
|
|
|
{file.name} |
|
|
|
className={`text-nowrap remixui_label ${fileStateClasses} ` + (file.isDirectory ? 'folder' : 'remixui_leaf')} |
|
|
|
</span> |
|
|
|
data-path={file.path} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{file.name} |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</CustomTooltip> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|