Skip to content

Commit

Permalink
fe style improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
LianaHus committed Sep 27, 2023
1 parent 99c742c commit 4cbf5ba
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) =>
return groupedActions.map((groupItem, groupIndex) =>
groupItem.map((item, index) => {
key++
const className = `remixui_liitem ${group !== item.group ? 'border-top' : ''}`
const className = `px-3 remixui_liitem ${group !== item.group ? 'border-top' : ''}`
group = item.group
if (item.name === 'Upload File') {
return (
Expand Down
25 changes: 16 additions & 9 deletions libs/remix-ui/workspace/src/lib/components/file-explorer-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,7 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {

return (
<>
<CustomTooltip placement="top" tooltipId="remixuilabelTooltip" tooltipClasses="text-nowrap" tooltipText={props.title}>
<span className="remixui_label" data-path={props.title} style={{fontWeight: 'bold'}}>
{props.title}
</span>
</CustomTooltip>
<span className="pl-0 pb-1">
<span data-id="spanContaining" className="pl-0 pb-1 w-50">
{state.menuItems.map(({action, title, icon, placement}, index) => {
if (action === 'uploadFile') {
return (
Expand All @@ -83,7 +78,13 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
tooltipText={<FormattedMessage id={`filePanel.${action}`} defaultMessage={title} />}
key={`index-${action}-${placement}-${icon}`}
>
<label id={action} style={{fontSize: '1.1rem', cursor: 'pointer'}} data-id={'fileExplorerUploadFile' + action} className={icon + ' mb-0 px-1 remixui_newFile'} key={`index-${action}-${placement}-${icon}`}>
<label
id={action}
style={{fontSize: '1.1rem', cursor: 'pointer'}}
data-id={'fileExplorerUploadFile' + action}
className={icon + ' mx-1 remixui_menuItem'}
key={`index-${action}-${placement}-${icon}`}
>
<input
id="fileUpload"
data-id="fileExplorerFileUpload"
Expand All @@ -108,7 +109,13 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
tooltipText={<FormattedMessage id={`filePanel.${action}`} defaultMessage={title} />}
key={`index-${action}-${placement}-${icon}`}
>
<label id={action} style={{fontSize: '1.1rem', cursor: 'pointer'}} data-id={'fileExplorerUploadFolder' + action} className={icon + ' mb-0 px-1 remixui_newFile'} key={`index-${action}-${placement}-${icon}`}>
<label
id={action}
style={{fontSize: '1.1rem', cursor: 'pointer'}}
data-id={'fileExplorerUploadFolder' + action}
className={icon + ' mx-1 remixui_menuItem'}
key={`index-${action}-${placement}-${icon}`}
>
<input
id="folderUpload"
data-id="fileExplorerFolderUpload"
Expand Down Expand Up @@ -151,7 +158,7 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
state.actions[action]()
}
}}
className={'newFile ' + icon + ' pr-2 pl-1 remixui_newFile'}
className={icon + ' mx-1 remixui_menuItem'}
key={`${action}-${title}-${index}`}
></label>
</CustomTooltip>
Expand Down
8 changes: 4 additions & 4 deletions libs/remix-ui/workspace/src/lib/components/file-explorer.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, {useEffect, useState, useRef, SyntheticEvent} from 'react' // eslint-disable-line
import {useIntl} from 'react-intl'
import {TreeView, TreeViewItem} from '@remix-ui/tree-view' // eslint-disable-line
import {TreeView} from '@remix-ui/tree-view' // eslint-disable-line
import {FileExplorerMenu} from './file-explorer-menu' // eslint-disable-line
import {FileExplorerContextMenu} from './file-explorer-context-menu' // eslint-disable-line
import {FileExplorerProps, WorkSpaceState} from '../types'

import '../css/file-explorer.css'
Expand Down Expand Up @@ -325,7 +324,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
data-id={`treeViewDivMenu`}
className={`d-flex flex-row align-items-center`}
>
<span className="w-100 pl-2">
<span className="w-100 pl-2 mt-1">
<div onClick={handleFileExplorerMenuClick}>
<FileExplorerMenu
title={''}
Expand Down Expand Up @@ -361,7 +360,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
showIconsMenu={props.showIconsMenu}
hideIconsMenu={props.hideIconsMenu}
/>
))}
))
}
</TreeView>
</div>
</TreeView>
Expand Down
4 changes: 2 additions & 2 deletions libs/remix-ui/workspace/src/lib/css/file-explorer.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ input[type="file"] {
.remixui_file {
padding : 4px;
}
.remixui_newFile i {
.remixui_menuItem i {
cursor : pointer;
}
.remixui_newFile:hover {
.remixui_menuItem:hover {
transform : scale(1.3);
}
.remixui_menu {
Expand Down

0 comments on commit 4cbf5ba

Please sign in to comment.