1
- import { LucideFolder } from 'lucide-react'
2
- import IconReadme from '~icons/mdi/book-open-variant-outline.jsx'
3
- import IconCodeJson from '~icons/mdi/code-json.jsx'
4
- import IconFile from '~icons/mdi/file-outline.jsx'
5
- import IconLanguageCss from '~icons/mdi/language-css3.jsx'
6
- import IconLanguageHtml from '~icons/mdi/language-html5.jsx'
7
- import IconLanguageJavascript from '~icons/mdi/language-javascript.jsx'
8
- import IconLanguageMarkdown from '~icons/mdi/language-markdown.jsx'
9
- import IconLanguageTypescript from '~icons/mdi/language-typescript.jsx'
10
- import IconReact from '~icons/mdi/react.jsx'
11
- import IconTailwind from '~icons/mdi/tailwind.jsx'
1
+ import { BeardedIconsCss } from '@/components/icons/bearded-icons/css'
2
+ import { BeardedIconsFile } from '@/components/icons/bearded-icons/file'
3
+ import { BeardedIconsFolder } from '@/components/icons/bearded-icons/folder'
4
+ import { BeardedIconsHtml } from '@/components/icons/bearded-icons/html'
5
+ import { BeardedIconsJavascript } from '@/components/icons/bearded-icons/javascript'
6
+ import { BeardedIconsJson } from '@/components/icons/bearded-icons/json'
7
+ import { BeardedIconsMarkdown } from '@/components/icons/bearded-icons/markdown'
8
+ import { BeardedIconsReactjs } from '@/components/icons/bearded-icons/reactjs'
9
+ import { BeardedIconsReactts } from '@/components/icons/bearded-icons/reactts'
10
+ import { BeardedIconsReadme } from '@/components/icons/bearded-icons/readme'
11
+ import { BeardedIconsTailwind } from '@/components/icons/bearded-icons/tailwind'
12
+ import { BeardedIconsTypescript } from '@/components/icons/bearded-icons/typescript'
12
13
import { getFileExtension } from '@/lib/fs-utils'
13
14
14
15
export function FileIcon ( {
@@ -21,37 +22,36 @@ export function FileIcon({
21
22
className ?: string
22
23
} ) {
23
24
if ( isFolder ) {
24
- return < LucideFolder className = { ` ${ className } ` } />
25
+ return < BeardedIconsFolder className = { className } />
25
26
}
26
27
27
28
switch ( true ) {
28
29
case / t a i l w i n d \. c o n f i g \. ( t s | j s ) ? $ / i. test ( name ) :
29
- return < IconTailwind className = { ` ${ className } text-[#38BDF9]` } />
30
+ return < BeardedIconsTailwind className = { className } />
30
31
31
32
case / r e a d m e \. m d $ / i. test ( name ) :
32
- return < IconReadme className = { ` ${ className } text-[#38BDF9]` } />
33
+ return < BeardedIconsReadme className = { className } />
33
34
}
34
35
35
36
const ext = getFileExtension ( name )
36
37
switch ( ext ) {
37
38
case '.tsx' :
39
+ return < BeardedIconsReactts className = { className } />
38
40
case '.jsx' :
39
- return < IconReact className = { ` ${ className } text-[#0A7EA4]` } />
41
+ return < BeardedIconsReactjs className = { className } />
40
42
case '.ts' :
41
- return < IconLanguageTypescript className = { ` ${ className } text-[#3078C6]` } />
43
+ return < BeardedIconsTypescript className = { className } />
42
44
case '.js' :
43
- return (
44
- < IconLanguageJavascript className = { `${ className } text-[#c8a421] dark:text-[#E8D44E]` } />
45
- )
45
+ return < BeardedIconsJavascript className = { className } />
46
46
case '.html' :
47
- return < IconLanguageHtml className = { ` ${ className } text-[#DC4A25]` } />
47
+ return < BeardedIconsHtml className = { className } />
48
48
case '.css' :
49
- return < IconLanguageCss className = { ` ${ className } text-[#3078C6]` } />
49
+ return < BeardedIconsCss className = { className } />
50
50
case '.json' :
51
- return < IconCodeJson className = { ` ${ className } text-[#CC8000]` } />
51
+ return < BeardedIconsJson className = { className } />
52
52
case '.md' :
53
- return < IconLanguageMarkdown className = { ` ${ className } text-[#3078C6]` } />
53
+ return < BeardedIconsMarkdown className = { className } />
54
54
default :
55
- return < IconFile className = { ` ${ className } text-muted-foreground` } />
55
+ return < BeardedIconsFile className = { className } />
56
56
}
57
57
}
0 commit comments