blob: 97e4ea5b1f1410a963a87834e163452cabb636f9 (
plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
import dynamic from 'next/dynamic';
import type { ComponentType, FC } from 'react';
import type { ArrowOrientation, ArrowProps } from './icons-paths';
const ArrowIconPaths: ComponentType<ArrowProps> = dynamic(async () =>
import('./icons-paths').then((mod) => mod.ArrowIconPaths)
);
const CCBySAIconPaths = dynamic(async () =>
import('./icons-paths').then((mod) => mod.CCBySAIconPaths)
);
const CareerIconPaths = dynamic(async () =>
import('./icons-paths').then((mod) => mod.CareerIconPaths)
);
const CogIconPaths = dynamic(async () =>
import('./icons-paths').then((mod) => mod.CogIconPaths)
);
const ComputerIconPaths = dynamic(async () =>
import('./icons-paths').then((mod) => mod.ComputerIconPaths)
);
const CrossIconPaths = dynamic(async () =>
import('./icons-paths').then((mod) => mod.CrossIconPaths)
);
const EnvelopIconPaths = dynamic(async () =>
import('./icons-paths').then((mod) => mod.EnvelopIconPaths)
);
const FeedIconPaths = dynamic(async () =>
import('./icons-paths').then((mod) => mod.FeedIconPaths)
);
const HelpIconPaths = dynamic(async () =>
import('./icons-paths').then((mod) => mod.HelpIconPaths)
);
const HomeIconPaths = dynamic(async () =>
import('./icons-paths').then((mod) => mod.HomeIconPaths)
);
const MagnifyingGlassIconPaths = dynamic(async () =>
import('./icons-paths').then((mod) => mod.MagnifyingGlassIconPaths)
);
const MoonIconPaths = dynamic(async () =>
import('./icons-paths').then((mod) => mod.MoonIconPaths)
);
const PostsStackIconPaths = dynamic(async () =>
import('./icons-paths').then((mod) => mod.PostsStackIconPaths)
);
const SunIconPaths = dynamic(async () =>
import('./icons-paths').then((mod) => mod.SunIconPaths)
);
export type SVGIconOrientation = ArrowOrientation;
export type SVGIconShape =
| 'arrow'
| 'career'
| 'cc-by-sa'
| 'cog'
| 'computer'
| 'cross'
| 'envelop'
| 'feed'
| 'help'
| 'home'
| 'magnifying-glass'
| 'moon'
| 'posts-stack'
| 'sun';
export type SVGPathsProps = {
/**
* The icon orientation. Only used with arrow icon.
*
* @default 'right'
*/
orientation?: SVGIconOrientation;
/**
* The icon shape.
*/
shape: SVGIconShape;
};
export const SVGPaths: FC<SVGPathsProps> = ({
orientation = 'right',
shape,
}) => {
switch (shape) {
case 'arrow':
return <ArrowIconPaths orientation={orientation} />;
case 'career':
return <CareerIconPaths />;
case 'cc-by-sa':
return <CCBySAIconPaths />;
case 'cog':
return <CogIconPaths />;
case 'computer':
return <ComputerIconPaths />;
case 'cross':
return <CrossIconPaths />;
case 'envelop':
return <EnvelopIconPaths />;
case 'feed':
return <FeedIconPaths />;
case 'help':
return <HelpIconPaths />;
case 'home':
return <HomeIconPaths />;
case 'magnifying-glass':
return <MagnifyingGlassIconPaths />;
case 'moon':
return <MoonIconPaths />;
case 'posts-stack':
return <PostsStackIconPaths />;
case 'sun':
default:
return <SunIconPaths />;
}
};
|