-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathicons.js
More file actions
63 lines (60 loc) · 1.54 KB
/
Copy pathicons.js
File metadata and controls
63 lines (60 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import React from 'react';
import {
House,
Rocket,
MessagesSquare,
Workflow,
Cpu,
SquareTerminal,
Terminal,
Code2,
Wrench,
Lock,
KeyRound,
VenetianMask,
Headset,
RotateCw,
BookMarked,
Images,
Braces,
PackageOpen,
Waypoints,
ListChecks,
Bot,
} from 'lucide-react';
// Single source of truth for icon names → Lucide components, shared by the
// sidebar (src/theme/DocSidebarItem/Link) and the <Card> MDX component.
// Names originate from the Mintlify (Font Awesome Pro) version of the docs and
// are mapped to their closest Lucide equivalent. Lucide omits brand marks, so
// `python` uses a generic code icon. Both sidebar keys (`square-terminal`) and
// card keys (`terminal`, `box-open-full`) are included so either source works.
const icons = {
house: House,
'rocket-launch': Rocket,
messages: MessagesSquare,
'circle-nodes': Workflow,
microchip: Cpu,
'square-terminal': SquareTerminal,
terminal: Terminal,
python: Code2,
sdk: SquareTerminal,
'screwdriver-wrench': Wrench,
lock: Lock,
'key-skeleton-left-right': KeyRound,
'user-secret': VenetianMask,
headset: Headset,
'arrows-spin': RotateCw,
images: Images,
'book-atlas': BookMarked,
'code-simple': Braces,
'box-open-full': PackageOpen,
waypoints: Waypoints,
'list-checks': ListChecks,
bot: Bot,
};
export function renderIcon(name, {size = 16, strokeWidth = 1.75} = {}) {
const Icon = icons[name];
if (!Icon) return null;
return <Icon size={size} strokeWidth={strokeWidth} aria-hidden="true" />;
}
export default icons;