Skip to content

Commit

Permalink
feat(gpt-runner-web): optimize svg color
Browse files Browse the repository at this point in the history
  • Loading branch information
2214962083 committed Jul 3, 2023
1 parent 51ddeec commit b2d6eca
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { IconPack } from './types'
export const folderIcons: FolderTheme
= {
name: 'specific',
defaultIcon: { name: 'folder-client' },
defaultIcon: { name: 'folder' },
rootFolder: { name: 'folder-root' },
icons: [
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ export function getFolderNameIconMap(folderIcons: FolderTheme) {
* Get the icon name based on the folder name
*/
const folderNameIconMap = getFolderNameIconMap(folderIcons)
export function getFolderIconByFolderName(folderName: string) {
return folderNameIconMap.get(folderName) || folderIcons.defaultIcon.name
export function getFolderIconByFolderName(folderName: string, isOpen = false) {
const defaultIconName = folderIcons.defaultIcon.name
const defaultOpenIconName = `${folderIcons.defaultIcon.name}-open`
return folderNameIconMap.get(folderName) || (isOpen ? defaultOpenIconName : defaultIconName)
}

export interface GetIconComponentProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,23 +213,13 @@ export const FileTree: FC<FileTreeProps> = memo((props: FileTreeProps) => {
marginRight: '0.25rem',
}} className={clsx(isExpanded ? 'codicon-chevron-down' : 'codicon-chevron-right')}></Icon >}

{/* <Icon style={{
marginLeft: !isLeaf ? '0' : '0.6rem',
marginRight: '0.45rem',
}} className={getIconClassName()}></Icon> */}

{/* <MaterialIconComponent
style={{
marginLeft: !isLeaf ? '0' : '0.6rem',
marginRight: '0.45rem',
}}
></MaterialIconComponent> */}
{renderMaterialIconComponent({
style: {
marginLeft: '0.2rem',
marginRight: '0.45rem',
width: '1rem',
height: '1rem',
flexShrink: '0',
},
})}
</>
Expand Down

0 comments on commit b2d6eca

Please sign in to comment.