Update text on view selection in storage header

This commit is contained in:
Terry Sutton authored and Joshen Lim committed 2022-10-18 11:34:04 +08:00
1 parent 4615040dc7
commit 477508d3db
1 file changed
+10 -2
@@ -16,6 +16,7 @@ import {
IconEdit2,
IconLoader,
IconChevronsUp,
IconList,
} from 'ui'
import { useStorageStore } from 'localStores/storageExplorer/StorageExplorerStore'
import { STORAGE_VIEWS, STORAGE_SORT_BY, STORAGE_SORT_BY_ORDER } from '../Storage.constants.ts'
@@ -284,11 +285,18 @@ const FileExplorerHeader = ({
>
<Button
as="span"
icon={<IconColumns size={16} strokeWidth={2} />}
icon={
view === 'LIST' ? (
<IconList size={16} strokeWidth={2} />
) : (
<IconColumns size={16} strokeWidth={2} />
)
}
type="text"
disabled={breadcrumbs.length === 0}
onChange={onChangeView}
>
Views
View as
</Button>
</Dropdown>
<Dropdown