Skip to content

Commit 3d623cc

Browse files
authored
Merge pull request #438 from platformatic/add-scheduled-jobs-sidebar-icon
Add scheduled jobs siderbar icon
2 parents dbd9022 + b3b5ddb commit 3d623cc

File tree

2 files changed

+129
-19
lines changed

2 files changed

+129
-19
lines changed
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
import * as React from 'react'
2+
import PropTypes from 'prop-types'
3+
import styles from './Icons.module.css'
4+
import { COLORS_ICON, SIZES, SMALL, MEDIUM, LARGE, MAIN_DARK_BLUE } from '../constants'
5+
6+
const ScheduledJobsIcon = ({
7+
color = MAIN_DARK_BLUE,
8+
size = MEDIUM,
9+
disabled = false,
10+
inactive = false
11+
}) => {
12+
let className = `${styles.svgClassName} ` + styles[`${color}`]
13+
if (disabled) {
14+
className += ` ${styles.iconDisabled}`
15+
}
16+
if (inactive) {
17+
className += ` ${styles.iconInactive}`
18+
}
19+
let icon = <></>
20+
21+
switch (size) {
22+
case SMALL:
23+
icon = (
24+
<svg
25+
width={16}
26+
height={16}
27+
viewBox='0 0 16 16'
28+
fill='none'
29+
xmlns='http://www.w3.org/2000/svg'
30+
className={className}
31+
>
32+
<path d='M6.92237 3.79488V2M5.13232 2H8.71241' stroke='white' strokeLinecap='round' strokeLinejoin='round' />
33+
<path d='M10.7341 4.94389L11.3742 4.31656M10.7485 3.6748L11.9998 4.95832' stroke='white' strokeLinecap='round' strokeLinejoin='round' />
34+
<path d='M3.29733 5.01136L2.67458 4.36678M2.03174 4.99121L3.31743 3.74235' stroke='white' strokeLinecap='round' strokeLinejoin='round' />
35+
<path d='M5 6.5L7 9' stroke='white' strokeLinecap='round' strokeLinejoin='round' />
36+
<path d='M6.92262 13.8718C4.20393 13.8718 2 11.6619 2 8.93592C2 6.20988 4.20393 4 6.92262 4C8.81506 4 10.4581 5.07076 11.282 6.64102' stroke='white' strokeLinecap='round' />
37+
<path d='M9.5 12.5H12.5M9.5 11H12.5M9.5 9.5H12.5' stroke='white' strokeLinecap='round' strokeLinejoin='round' />
38+
<path d='M8 9V13C8 13.5523 8.44772 14 9 14H13C13.5523 14 14 13.5523 14 13V9C14 8.44772 13.5523 8 13 8H11H9C8.44772 8 8 8.44772 8 9Z' stroke='white' strokeLinecap='round' strokeLinejoin='round' />
39+
</svg>
40+
)
41+
break
42+
case MEDIUM:
43+
icon = (
44+
<svg
45+
width={24}
46+
height={24}
47+
viewBox='0 0 24 24'
48+
fill='none'
49+
xmlns='http://www.w3.org/2000/svg'
50+
className={className}
51+
>
52+
<path d='M10.3836 5.69232V3M7.69849 3H13.0686' stroke='white' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
53+
<path d='M16.1012 7.41535L17.0613 6.47436M16.1228 5.51172L17.9997 7.43699' stroke='white' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
54+
<path d='M4.946 7.51656L4.01188 6.54968M3.04761 7.48633L4.97614 5.61304' stroke='white' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
55+
<path d='M7.5 9.75L10.5 13.5' stroke='white' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
56+
<path d='M10.3839 20.8077C6.3059 20.8077 3 17.4929 3 13.4039C3 9.31483 6.3059 6 10.3839 6C13.2226 6 15.6871 7.60614 16.9229 9.96153' stroke='white' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
57+
<path d='M14.25 18.75H18.75M14.25 16.5H18.75M14.25 14.25H18.75' stroke='white' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
58+
<path d='M12 13V20C12 20.5523 12.4477 21 13 21H20C20.5523 21 21 20.5523 21 20V13C21 12.4477 20.5523 12 20 12H16.5H13C12.4477 12 12 12.4477 12 13Z' stroke='white' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
59+
</svg>
60+
)
61+
break
62+
case LARGE:
63+
icon = (
64+
<svg
65+
width={40}
66+
height={40}
67+
viewBox='0 0 40 40'
68+
fill='none'
69+
xmlns='http://www.w3.org/2000/svg'
70+
className={className}
71+
>
72+
<path d='M17.3059 9.4872V5M12.8308 5H21.781' stroke='white' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
73+
<path d='M26.8354 12.3583L28.4354 10.7899M26.8713 9.18555L29.9995 12.3943' stroke='white' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
74+
<path d='M8.24333 12.5279L6.68646 10.9165M5.07935 12.4775L8.29357 9.35539' stroke='white' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
75+
<path d='M12.5 16.25L17.5 22.5' stroke='white' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
76+
<path d='M17.3066 34.6796C10.5098 34.6796 5 29.1549 5 22.3398C5 15.5247 10.5098 10 17.3066 10C22.0376 10 26.1452 12.6769 28.2049 16.6026' stroke='white' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
77+
<path d='M23.75 31.25H31.25M23.75 27.5H31.25M23.75 23.75H31.25' stroke='white' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
78+
<path d='M20 21V34C20 34.5523 20.4477 35 21 35H34C34.5523 35 35 34.5523 35 34V21C35 20.4477 34.5523 20 34 20H27.5H21C20.4477 20 20 20.4477 20 21Z' stroke='white' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
79+
</svg>
80+
)
81+
break
82+
83+
default:
84+
break
85+
}
86+
return icon
87+
}
88+
89+
ScheduledJobsIcon.propTypes = {
90+
/**
91+
* color of text, icon and borders
92+
*/
93+
color: PropTypes.oneOf(COLORS_ICON),
94+
/**
95+
* Size
96+
*/
97+
size: PropTypes.oneOf(SIZES),
98+
/**
99+
* disabled
100+
*/
101+
disabled: PropTypes.bool,
102+
/**
103+
* inactive
104+
*/
105+
inactive: PropTypes.bool
106+
}
107+
108+
export default ScheduledJobsIcon

src/components/icons/index.js

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ import ResourceIcon from './ResourceIcon'
168168
import RestartIcon from './RestartIcon'
169169
import RocketIcon from './RocketIcon'
170170
import RunningIcon from './RunningIcon'
171+
import ScheduledJobsIcon from './ScheduledJobsIcon'
171172
import ScalerDetailsIcon from './ScalerDetailsIcon'
172173
import ScalerHistoryIcon from './ScalerHistoryIcon'
173174
import SendIcon from './SendIcon'
@@ -266,11 +267,11 @@ export default {
266267
CircleCheckMarkButtonIcon,
267268
CircleCheckMarkIcon,
268269
CircleCheckMarkFullIcon,
269-
CircleExclamationIcon,
270270
CircleCopyPasteIcon,
271271
CircleCloseIcon,
272272
CircleCloseHoverIcon,
273273
CircleDownloadIcon,
274+
CircleExclamationIcon,
274275
CircleEditIcon,
275276
CircleFullIcon,
276277
CircleGearIcon,
@@ -300,20 +301,20 @@ export default {
300301
DatabaseMigrationIcon,
301302
DepencenciesReloadIcon,
302303
DeploymentHistoryIcon,
303-
DownloadIcon,
304304
DocumentIcon,
305+
DownloadIcon,
305306
EditDocumentIcon,
306307
EditIcon,
307308
EntrypointIcon,
308-
EyeClosedIcon,
309-
EyeOpenedIcon,
309+
EnlargeIcon,
310+
EntryIcon,
311+
EnvVariableszIcon,
310312
ExpandIcon,
311313
ExpandSquareIcon,
312314
ExploreDocIcon,
313315
ExportIcon,
314-
EnlargeIcon,
315-
EntryIcon,
316-
EnvVariableszIcon,
316+
EyeClosedIcon,
317+
EyeOpenedIcon,
317318
FailureRateIcon,
318319
FolderIcon,
319320
FoldersIcon,
@@ -326,16 +327,16 @@ export default {
326327
GraphQLEditsIcon,
327328
HorizontalPodAutoscalerIcon,
328329
HourglassIcon,
330+
K8SIcon,
331+
K8SMetricsIcon,
332+
KeyIcon,
329333
ImportAppIcon,
330334
ImportIcon,
331-
InfrastructureIcon,
332335
InfoCircleIcon,
336+
InfrastructureIcon,
333337
IngressControllIcon,
334338
InternalLinkIcon,
335339
InternetIcon,
336-
K8SIcon,
337-
K8SMetricsIcon,
338-
KeyIcon,
339340
LabelIcon,
340341
LayersIcon,
341342
LensIcon,
@@ -350,29 +351,29 @@ export default {
350351
MissingTemplateIcon,
351352
NameAppIcon,
352353
NextJSIcon,
353-
NodeJSIcon,
354354
NodeJSMetricsIcon,
355355
NoActivitiesIcon,
356356
NoDeploymentsIcon,
357+
NodeJSIcon,
357358
NoMetricsIcon,
358359
NoResultsIcon,
359360
NotCompliantServiceIcon,
360361
OpenAPIEditsIcon,
361362
OrganizationIcon,
363+
OutOfBoxGraphQLIcon,
362364
OutdatedServiceIcon,
363365
OtherLogosGoogleIcon,
364-
OutOfBoxGraphQLIcon,
365366
PlatformaticComposerIcon,
366367
PlatformaticDBIcon,
367368
PlatformaticRuntimeIcon,
368369
PlatformaticServiceIcon,
369370
PlayIcon,
370-
PodPerformanceIcon,
371371
PodDetailsIcon,
372372
PodhealthIcon,
373373
PodLogsIcon,
374374
PodMetricsIcon,
375375
PodServicesIcon,
376+
PodPerformanceIcon,
376377
PreviewPRIcon,
377378
PullRequestIcon,
378379
PullRequestLoadingIcon,
@@ -385,13 +386,12 @@ export default {
385386
RestartIcon,
386387
RocketIcon,
387388
RunningIcon,
389+
ScheduledJobsIcon,
388390
ScalerDetailsIcon,
389391
ScalerHistoryIcon,
390392
SendIcon,
391393
ServiceIcon,
392394
ServicesWorkingIcon,
393-
StopIcon,
394-
AppStoppedIcon,
395395
SlotIcon,
396396
SwitchIcon,
397397
SocialDiscordIcon,
@@ -404,16 +404,18 @@ export default {
404404
SortIcon,
405405
SortDownArrowAndBarIcon,
406406
SortDownIcon,
407-
SortUpIcon,
408407
SortUpArrowAndBarIcon,
408+
SortUpIcon,
409409
StackablesIcon,
410410
StackablesPluginIcon,
411411
StackablesTemplateIcon,
412+
StopIcon,
413+
AppStoppedIcon,
412414
TableIcon,
413415
TaxonomyIcon,
414416
TerminalIcon,
415-
TeamsIcon,
416417
TwoUsersIcon,
418+
TeamsIcon,
417419
TrashIcon,
418420
UpgradeIcon,
419421
UploadFileIcon,
@@ -423,8 +425,8 @@ export default {
423425
UserRoleIcon,
424426
WorkspaceDynamicIcon,
425427
WorkspaceEmptyIcon,
426-
WorkspaceFailIcon,
427428
WorkspaceGitHubIcon,
429+
WorkspaceFailIcon,
428430
WorkspaceLoadingIcon,
429431
WorkspaceReadyIcon,
430432
WorkspaceStaticIcon,

0 commit comments

Comments
 (0)