|
1 | 1 |
|
2 | 2 | import React from 'react'
|
3 |
| -import Svg, { Path } from 'react-native-svg' |
4 |
| -import { HugeIconProps, Variant, defaultColor, defaultSize, defaultStrokeWidth, defaultVariant } from './constants' |
| 3 | +import Svg, { Circle, ClipPath, Defs, Ellipse, G, Line, LinearGradient, Mask, Path, Polygon, Polyline, RadialGradient, Rect, Stop } from 'react-native-svg' |
| 4 | +import { Variant, HugeIconProps, defaultStrokeWidth, defaultVariant, defaultColor, defaultSize } from './constants' |
5 | 5 |
|
6 |
| -const iconMap: Record<Variant, React.FC<HugeIconProps>> = { |
7 |
| - 'stroke-rounded': StrokeRounded, |
8 |
| - 'stroke-standard': StrokeStandard, |
9 |
| - 'solid-standard': SolidStandard, |
10 |
| - 'duotone-rounded': DuotoneRounded, |
11 |
| - 'twotone-rounded': TwotoneRounded, |
| 6 | +const iconMap: Partial<Record<Variant, React.FC<HugeIconProps>>> = { |
12 | 7 | 'solid-rounded': SolidRounded,
|
13 |
| - 'bulk-rounded': BulkRounded, |
14 |
| - 'stroke-sharp': StrokeSharp, |
15 |
| - 'solid-sharp': SolidSharp, |
| 8 | + 'stroke-rounded': StrokeRounded, |
16 | 9 | }
|
17 | 10 |
|
18 | 11 | export default function Add01Icon({ variant, ...rest }: HugeIconProps) {
|
19 |
| - const Component = iconMap[variant || defaultVariant] |
| 12 | + const selectedVariant = variant || defaultVariant |
| 13 | + const Component = iconMap[selectedVariant] || iconMap[defaultVariant] || StrokeRounded |
20 | 14 | return <Component {...rest} />
|
21 | 15 | }
|
22 | 16 |
|
23 |
| -function StrokeRounded({ size = defaultSize, color = defaultColor, strokeWidth = defaultStrokeWidth, className, style }: HugeIconProps) { |
24 |
| - return (<Svg className={className} style={style} width={size} height={size} viewBox="0 0 24 24" fill="none"> |
25 |
| -<Path d="M12 4V20" stroke={color} strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round"/> |
26 |
| -<Path d="M4 12H20" stroke={color} strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round"/> |
27 |
| -</Svg> |
28 |
| -) |
29 |
| -} |
30 |
| - |
31 |
| -function StrokeStandard({ size = defaultSize, color = defaultColor, strokeWidth = defaultStrokeWidth, className, style }: HugeIconProps) { |
32 |
| - return (<Svg className={className} style={style} width={size} height={size} viewBox="0 0 24 24" fill="none"> |
33 |
| -<Path d="M12 4V20" stroke={color} strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round"/> |
34 |
| -<Path d="M4 12H20" stroke={color} strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round"/> |
35 |
| -</Svg> |
36 |
| -) |
37 |
| -} |
38 |
| - |
39 |
| -function SolidStandard({ size = defaultSize, color = defaultColor, strokeWidth = defaultStrokeWidth, className, style }: HugeIconProps) { |
40 |
| - return (<Svg className={className} style={style} width={size} height={size} viewBox="0 0 24 24" fill="none"> |
41 |
| -<Path fillRule="evenodd" clipRule="evenodd" d="M12 2.75C12.6904 2.75 13.25 3.30964 13.25 4V20C13.25 20.6904 12.6904 21.25 12 21.25C11.3096 21.25 10.75 20.6904 10.75 20V4C10.75 3.30964 11.3096 2.75 12 2.75Z" fill={color}/> |
42 |
| -<Path fillRule="evenodd" clipRule="evenodd" d="M2.75 12C2.75 11.3096 3.30964 10.75 4 10.75H20C20.6904 10.75 21.25 11.3096 21.25 12C21.25 12.6904 20.6904 13.25 20 13.25H4C3.30964 13.25 2.75 12.6904 2.75 12Z" fill={color}/> |
43 |
| -</Svg> |
44 |
| -) |
45 |
| -} |
46 |
| - |
47 |
| -function DuotoneRounded({ size = defaultSize, color = defaultColor, strokeWidth = defaultStrokeWidth, className, style }: HugeIconProps) { |
48 |
| - return (<Svg className={className} style={style} width={size} height={size} viewBox="0 0 24 24" fill="none"> |
49 |
| -<Path opacity="0.4" d="M12 4V20M4 12H20" stroke={color} strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round"/> |
50 |
| -</Svg> |
51 |
| -) |
52 |
| -} |
53 |
| - |
54 |
| -function TwotoneRounded({ size = defaultSize, color = defaultColor, strokeWidth = defaultStrokeWidth, className, style }: HugeIconProps) { |
55 |
| - return (<Svg className={className} style={style} width={size} height={size} viewBox="0 0 24 24" fill="none"> |
56 |
| -<Path d="M12 4V20" stroke={color} strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round"/> |
57 |
| -<Path opacity="0.4" d="M4 12H20" stroke={color} strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round"/> |
58 |
| -</Svg> |
59 |
| -) |
60 |
| -} |
61 |
| - |
62 | 17 | function SolidRounded({ size = defaultSize, color = defaultColor, strokeWidth = defaultStrokeWidth, className, style }: HugeIconProps) {
|
63 | 18 | return (<Svg className={className} style={style} width={size} height={size} viewBox="0 0 24 24" fill="none">
|
64 |
| -<Path fillRule="evenodd" clipRule="evenodd" d="M12 2.75C12.6904 2.75 13.25 3.30964 13.25 4V20C13.25 20.6904 12.6904 21.25 12 21.25C11.3096 21.25 10.75 20.6904 10.75 20V4C10.75 3.30964 11.3096 2.75 12 2.75Z" fill={color}/> |
65 |
| -<Path fillRule="evenodd" clipRule="evenodd" d="M2.75 12C2.75 11.3096 3.30964 10.75 4 10.75H20C20.6904 10.75 21.25 11.3096 21.25 12C21.25 12.6904 20.6904 13.25 20 13.25H4C3.30964 13.25 2.75 12.6904 2.75 12Z" fill={color}/> |
| 19 | +<Path d="M11.001 19.002V13.002H5C4.44772 13.002 4 12.5543 4 12.002C4 11.4498 4.44772 11.002 5 11.002H11.001V5.00009C11.001 4.44781 11.4487 4.00009 12.001 4.00009C12.5533 4.0001 13.001 4.44781 13.001 5.00009V11.002H19.002L19.1045 11.0069C19.6086 11.0583 20.002 11.4844 20.002 12.002C20.002 12.5197 19.6086 12.9458 19.1045 12.9972L19.002 13.002H13.001V19.002C13.001 19.5543 12.5533 20.002 12.001 20.002C11.4487 20.002 11.001 19.5543 11.001 19.002Z" fill={color}/> |
66 | 20 | </Svg>
|
67 | 21 | )
|
68 | 22 | }
|
69 | 23 |
|
70 |
| -function BulkRounded({ size = defaultSize, color = defaultColor, strokeWidth = defaultStrokeWidth, className, style }: HugeIconProps) { |
71 |
| - return (<Svg className={className} style={style} width={size} height={size} viewBox="0 0 24 24" fill="none"> |
72 |
| -<Path fillRule="evenodd" clipRule="evenodd" d="M12 2.75C12.6904 2.75 13.25 3.30964 13.25 4V20C13.25 20.6904 12.6904 21.25 12 21.25C11.3096 21.25 10.75 20.6904 10.75 20V4C10.75 3.30964 11.3096 2.75 12 2.75Z" fill={color}/> |
73 |
| -<Path opacity="0.4" fillRule="evenodd" clipRule="evenodd" d="M2.75 12C2.75 11.3096 3.30964 10.75 4 10.75H20C20.6904 10.75 21.25 11.3096 21.25 12C21.25 12.6904 20.6904 13.25 20 13.25H4C3.30964 13.25 2.75 12.6904 2.75 12Z" fill={color}/> |
74 |
| -</Svg> |
75 |
| -) |
76 |
| -} |
77 |
| - |
78 |
| -function StrokeSharp({ size = defaultSize, color = defaultColor, strokeWidth = defaultStrokeWidth, className, style }: HugeIconProps) { |
79 |
| - return (<Svg className={className} style={style} width={size} height={size} viewBox="0 0 24 24" fill="none"> |
80 |
| -<Path d="M12 4V20" stroke={color} strokeWidth={strokeWidth} strokeLinejoin="round"/> |
81 |
| -<Path d="M4 12H20" stroke={color} strokeWidth={strokeWidth} strokeLinejoin="round"/> |
82 |
| -</Svg> |
83 |
| -) |
84 |
| -} |
85 |
| - |
86 |
| -function SolidSharp({ size = defaultSize, color = defaultColor, strokeWidth = defaultStrokeWidth, className, style }: HugeIconProps) { |
| 24 | +function StrokeRounded({ size = defaultSize, color = defaultColor, strokeWidth = defaultStrokeWidth, className, style }: HugeIconProps) { |
87 | 25 | return (<Svg className={className} style={style} width={size} height={size} viewBox="0 0 24 24" fill="none">
|
88 |
| -<Path d="M10.75 13.25V20H13.25V13.25H20V10.75H13.25V4H10.75V10.75H4V13.25H10.75Z" fill={color}/> |
| 26 | +<Path d="M12.001 5.00003V19.002" stroke={color} strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round"/> |
| 27 | +<Path d="M19.002 12.002L4.99998 12.002" stroke={color} strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round"/> |
89 | 28 | </Svg>
|
90 | 29 | )
|
91 | 30 | }
|
0 commit comments