PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.0.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.0.0
2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 All 61 releases
subscription / src / dashboard / Icon.js

Icon.js in Subscriptions for WooCommerce with Stripe Recurring Payments 2.0.0, at src/dashboard/Icon.js

90 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * The handful of glyphs this screen needs.
3 *
4 * Inline rather than @wordpress/icons: that package is bundled, not provided by
5 * WordPress at runtime, so importing it would add a build dependency to the
6 * free plugin for six small paths.
7 */
8
9 const PATHS = {
10 people: (
11 <>
12 <path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" />
13 <circle cx="9" cy="7" r="4" />
14 <path d="M23 21v-2a4 4 0 0 0-3-3.87" />
15 </>
16 ),
17 pause: (
18 <>
19 <circle cx="12" cy="12" r="10" />
20 <line x1="10" y1="15" x2="10" y2="9" />
21 <line x1="14" y1="15" x2="14" y2="9" />
22 </>
23 ),
24 money: (
25 <>
26 <circle cx="12" cy="12" r="10" />
27 <path d="M14.5 9.5a2.5 2.5 0 0 0-2.5-1.5c-1.4 0-2.5.7-2.5 2s1.1 2 2.5 2 2.5.7 2.5 2-1.1 2-2.5 2a2.5 2.5 0 0 1-2.5-1.5" />
28 <line x1="12" y1="6" x2="12" y2="18" />
29 </>
30 ),
31 alert: (
32 <>
33 <path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" />
34 <line x1="12" y1="9" x2="12" y2="13" />
35 <line x1="12" y1="17" x2="12.01" y2="17" />
36 </>
37 ),
38 trend: (
39 <>
40 <polyline points="23 6 13.5 15.5 8.5 10.5 1 18" />
41 <polyline points="17 6 23 6 23 12" />
42 </>
43 ),
44 chart: (
45 <>
46 <line x1="18" y1="20" x2="18" y2="10" />
47 <line x1="12" y1="20" x2="12" y2="4" />
48 <line x1="6" y1="20" x2="6" y2="14" />
49 </>
50 ),
51 card: (
52 <>
53 <rect x="1" y="4" width="22" height="16" rx="2" />
54 <line x1="1" y1="10" x2="23" y2="10" />
55 </>
56 ),
57 shield: <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />,
58 check: <polyline points="20 6 9 17 4 12" />,
59 external: (
60 <>
61 <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
62 <polyline points="15 3 21 3 21 9" />
63 <line x1="10" y1="14" x2="21" y2="3" />
64 </>
65 ),
66 };
67
68 export default function Icon({ name, size = 16 }) {
69 if (!PATHS[name]) {
70 return null;
71 }
72
73 return (
74 <svg
75 width={size}
76 height={size}
77 viewBox="0 0 24 24"
78 fill="none"
79 stroke="currentColor"
80 strokeWidth="2"
81 strokeLinecap="round"
82 strokeLinejoin="round"
83 aria-hidden="true"
84 focusable="false"
85 >
86 {PATHS[name]}
87 </svg>
88 );
89 }
90