add custom tooltip

pull/4446/head
Joseph Izang 10 months ago
parent 7b7f4f49ec
commit dfb2429df9
  1. 25
      libs/remix-ui/workspace/src/lib/components/file-explorer-hovericons.tsx

@ -1,7 +1,6 @@
import React, { useState } from 'react'
import { CustomTooltip } from '@remix-ui/helper'
import { FormattedMessage } from 'react-intl'
import { ROOT_PATH } from '../utils/constants'
export type FileHoverIconsProps = {
isEditable?: boolean
@ -20,13 +19,13 @@ export function FileHoverIcons(props: FileHoverIconsProps) {
{
props.file.isDirectory ? (
<>
{/* <CustomTooltip
<CustomTooltip
placement="right-start"
delay={{show: 1000, hide: 0}}
tooltipText={<FormattedMessage id="filePanel.edit" />}
tooltipId={`filePanel.edit.${props.file.path}`}
tooltipClasses="text-nowrap"
> */}
>
<span
className="far fa-folder fa-1x remixui_icons_space remixui_icons"
onClick={async (e) => {
@ -34,14 +33,14 @@ export function FileHoverIcons(props: FileHoverIconsProps) {
await props.handleNewFolderOp(props.file.path)
}}
></span>
{/* </CustomTooltip> */}
{/* <CustomTooltip
</CustomTooltip>
<CustomTooltip
placement="right-start"
delay={{show: 1000, hide: 0}}
tooltipText={<FormattedMessage id="fileExplorer.edit" />}
tooltipId={`fileExplorer.edit.${props.file.path}`}
tooltipClasses="text-nowrap"
> */}
>
<span
className="far fa-file fa-1x remixui_icons remixui_icons_space"
onClick={async (e) => {
@ -49,17 +48,17 @@ export function FileHoverIcons(props: FileHoverIconsProps) {
await props.handleNewFileOp(props.file.path)
}}
></span>
{/* </CustomTooltip> */}
</CustomTooltip>
</>
) : null
}
{/* <CustomTooltip
<CustomTooltip
placement="right-start"
delay={{show: 1000, hide: 0}}
tooltipText={<FormattedMessage id="fileExplorer.edit" />}
tooltipId={`fileExplorer.edit.${props.file.path}`}
tooltipClasses="text-nowrap"
> */}
>
<span
className="far fa-pen fa-1x remixui_icons remixui_icons_space"
onClick={async (e) => {
@ -67,14 +66,14 @@ export function FileHoverIcons(props: FileHoverIconsProps) {
await props.renamePathOp(props.file.path, props.file.type)
}}
></span>
{/* </CustomTooltip> */}
{/* <CustomTooltip
</CustomTooltip>
<CustomTooltip
placement="right-start"
delay={{show: 1000, hide: 0}}
tooltipText={<FormattedMessage id="fileExplorer.edit" />}
tooltipId={`fileExplorer.edit.${props.file.path}`}
tooltipClasses="text-nowrap"
> */}
>
<span
className="far fa-trash fa-1x remixui_icons remixui_icons_space"
onClick={async (e) => {
@ -82,7 +81,7 @@ export function FileHoverIcons(props: FileHoverIconsProps) {
await props.deletePathOp(props.file.path)
}}
></span>
{/* </CustomTooltip> */}
</CustomTooltip>
</div>
}
</>

Loading…
Cancel
Save