- {
+ test.each(CASES)('renders $name at the canonical stroke width', (props) => {
+ const { container } = customRender(
+
+ )
+
+ const icon = container.querySelector('svg')
+
+ expect(icon).toHaveClass(props.expectedIcon)
+ expect(icon).toHaveAttribute('stroke-width', '1.5')
+ })
+})
diff --git a/apps/studio/components/interfaces/Storage/StorageRowIcon.tsx b/apps/studio/components/interfaces/Storage/StorageRowIcon.tsx
new file mode 100644
index 00000000000..814a3b259c2
--- /dev/null
+++ b/apps/studio/components/interfaces/Storage/StorageRowIcon.tsx
@@ -0,0 +1,60 @@
+import { FilesBucket as FilesBucketIcon } from 'icons'
+import { File, Film, FolderOpen, Image as ImageIcon, LoaderCircle, Music } from 'lucide-react'
+
+import { STORAGE_ROW_STATUS, STORAGE_ROW_TYPES, STORAGE_VIEWS } from './Storage.constants'
+
+const ICON_STROKE_WIDTH = 1.5
+
+interface StorageRowIconProps {
+ view: STORAGE_VIEWS
+ status: STORAGE_ROW_STATUS
+ fileType: string
+ isOpened?: boolean
+ mimeType: string | undefined
+}
+
+export const StorageRowIcon = ({
+ view,
+ status,
+ fileType,
+ isOpened = false,
+ mimeType,
+}: StorageRowIconProps) => {
+ if (view === STORAGE_VIEWS.LIST && status === STORAGE_ROW_STATUS.LOADING) {
+ return (
+
+ )
+ }
+
+ if (fileType === STORAGE_ROW_TYPES.FOLDER) {
+ return isOpened ? (
+
+ ) : (
+
+ )
+ }
+
+ if (mimeType?.includes('image')) {
+ return (
+
+ )
+ }
+
+ if (mimeType?.includes('audio')) {
+ return
+ }
+
+ if (mimeType?.includes('video')) {
+ return
+ }
+
+ return
+}