/
index.jsx
35 lines (28 loc) · 1.17 KB
/
index.jsx
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
// generate by iconfont-componentized
import React, { memo } from 'react';
import IconFontJia from "./IconFontJia";
import IconFontBriefcase from "./IconFontBriefcase";
import IconFontAnonymousIconfont from "./IconFontAnonymousIconfont";
import IconFontJiesuan from "./IconFontJiesuan";
import IconFontCanjuYongcan from "./IconFontCanjuYongcan";
export { IconFontJia };
export { IconFontBriefcase };
export { IconFontAnonymousIconfont };
export { IconFontJiesuan };
export { IconFontCanjuYongcan };
export const names = ["jia","briefcase","anonymous-iconfont","jiesuan","canju-yongcan"];
function IconFont(props) {
switch (props.name) {
case 'jia': return <IconFontJia {...props} />;
case 'briefcase': return <IconFontBriefcase {...props} />;
case 'anonymous-iconfont': return <IconFontAnonymousIconfont {...props} />;
case 'jiesuan': return <IconFontJiesuan {...props} />;
case 'canju-yongcan': return <IconFontCanjuYongcan {...props} />;
default:
throw new Error(`IconFont's name must one of ${JSON.stringify(names)} but got "${props.name}"`)
}
}
IconFont.defaultProps = {
size: 32
}
export default memo(IconFont)