From 8873ea3c0b208fed15324f7efd13e549b2fba593 Mon Sep 17 00:00:00 2001 From: Kazuma Tsuchiya Date: Thu, 10 Oct 2024 20:51:59 +0900 Subject: [PATCH] show folder and file icon on asset tree --- web/src/components/atoms/Icon/icons.ts | 2 ++ .../Asset/Asset/AssetBody/UnzipFileList/index.tsx | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/web/src/components/atoms/Icon/icons.ts b/web/src/components/atoms/Icon/icons.ts index 2b118d8a60..ba1edb677e 100644 --- a/web/src/components/atoms/Icon/icons.ts +++ b/web/src/components/atoms/Icon/icons.ts @@ -33,6 +33,7 @@ import { MenuFoldOutlined, MenuUnfoldOutlined, FolderOutlined, + FolderOpenOutlined, LinkOutlined, UserAddOutlined, ClearOutlined, @@ -137,6 +138,7 @@ export default { panelToggleLeft: MenuFoldOutlined, panelToggleRight: MenuUnfoldOutlined, folder: FolderOutlined, + folderOpen: FolderOpenOutlined, dot: Dot, userAdd: UserAddOutlined, clear: ClearOutlined, diff --git a/web/src/components/molecules/Asset/Asset/AssetBody/UnzipFileList/index.tsx b/web/src/components/molecules/Asset/Asset/AssetBody/UnzipFileList/index.tsx index 6b21de1ba6..2673273199 100644 --- a/web/src/components/molecules/Asset/Asset/AssetBody/UnzipFileList/index.tsx +++ b/web/src/components/molecules/Asset/Asset/AssetBody/UnzipFileList/index.tsx @@ -74,13 +74,15 @@ const UnzipFileList: React.FC = ({ ) : ( treeData && ( } + switcherIcon={({ expanded }) => ( + + )} defaultExpandedKeys={["0-0"]} selectedKeys={selectedKeys} onSelect={handleSelect} treeData={treeData} multiple={false} - showLine + showLine={{ showLeafIcon: true }} titleRender={({ title, key, path }) => { return ( <> @@ -144,4 +146,10 @@ const CopyIcon = styled(Icon)` } `; +const SwitcherIcon = styled(Icon)` + svg { + transform: none !important; + } +`; + export default UnzipFileList;