address comments from @LianaHus

pull/4446/head
Joseph Izang 9 months ago
parent 00c8d063c1
commit ee5dccd5a2
  1. 10
      libs/remix-ui/workspace/src/lib/components/file-explorer-hovericons.tsx
  2. 2
      libs/remix-ui/workspace/src/lib/components/flat-tree.tsx
  3. 4
      libs/remix-ui/workspace/src/lib/css/file-explorer.css

@ -7,7 +7,7 @@ export type FileHoverIconsProps = {
file: any file: any
handleNewFolderOp?: any handleNewFolderOp?: any
handleNewFileOp?: any handleNewFileOp?: any
renamePathOp?: (path: string, newName: string) => void | Promise<void> renamePathOp?: (path: string, type: string) => void
deletePathOp?: (path: string | string[]) => void | Promise<void> deletePathOp?: (path: string | string[]) => void | Promise<void>
} }
@ -27,7 +27,7 @@ export function FileHoverIcons(props: FileHoverIconsProps) {
tooltipClasses="text-nowrap" tooltipClasses="text-nowrap"
> >
<span <span
className="far fa-folder fa-1x remixui_icons_space remixui_icons" className="far fa-folder fa-1x mr-2 remixui_icons"
onClick={async (e) => { onClick={async (e) => {
e.stopPropagation() e.stopPropagation()
await props.handleNewFolderOp(props.file.path) await props.handleNewFolderOp(props.file.path)
@ -45,7 +45,7 @@ export function FileHoverIcons(props: FileHoverIconsProps) {
tooltipClasses="text-nowrap" tooltipClasses="text-nowrap"
> >
<span <span
className="far fa-file fa-1x remixui_icons remixui_icons_space" className="far fa-file fa-1x remixui_icons mr-2"
onClick={async (e) => { onClick={async (e) => {
e.stopPropagation() e.stopPropagation()
await props.handleNewFileOp(props.file.path) await props.handleNewFileOp(props.file.path)
@ -66,7 +66,7 @@ export function FileHoverIcons(props: FileHoverIconsProps) {
tooltipClasses="text-nowrap" tooltipClasses="text-nowrap"
> >
<span <span
className="far fa-pen fa-1x remixui_icons remixui_icons_space" className="far fa-pen fa-1x remixui_icons mr-2"
onClick={async (e) => { onClick={async (e) => {
e.stopPropagation() e.stopPropagation()
await props.renamePathOp(props.file.path, props.file.type) await props.renamePathOp(props.file.path, props.file.type)
@ -84,7 +84,7 @@ export function FileHoverIcons(props: FileHoverIconsProps) {
tooltipClasses="text-nowrap" tooltipClasses="text-nowrap"
> >
<span <span
className="far fa-trash fa-1x remixui_icons remixui_icons_space" className="far fa-trash fa-1x remixui_icons mr-2"
onClick={async (e) => { onClick={async (e) => {
e.stopPropagation() e.stopPropagation()
await props.deletePathOp(props.file.path) await props.deletePathOp(props.file.path)

@ -41,7 +41,7 @@ interface FlatTreeProps {
createNewFile?: any createNewFile?: any
createNewFolder?: any createNewFolder?: any
deletePath?: (path: string | string[]) => void | Promise<void> deletePath?: (path: string | string[]) => void | Promise<void>
renamePath?: (path: string, type: string, isNew?: boolean) => void renamePath?: (path: string, type: string) => void
editModeOn?: (path: string, type: string, isNew?: boolean) => void editModeOn?: (path: string, type: string, isNew?: boolean) => void
} }

@ -69,7 +69,3 @@ ul {
.remixui_icons:hover { .remixui_icons:hover {
color: var(--text); color: var(--text);
} }
.remixui_icons_space {
margin-right: 8px;
}

Loading…
Cancel
Save