@platformatic/ui-components 0.1.53 → 0.1.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/package.json +1 -1
  2. package/renovate.json +6 -0
  3. package/src/components/Modal.jsx +1 -1
  4. package/src/components/Sidebar.jsx +12 -5
  5. package/src/components/Sidebar.module.css +1 -1
  6. package/src/components/SimpleMetric.jsx +1 -1
  7. package/src/components/forms/Preview.jsx +1 -1
  8. package/src/components/icons/AlertIcon.jsx +1 -1
  9. package/src/components/icons/ApiEmptyIcon.jsx +140 -106
  10. package/src/components/icons/ApiIconClosed.jsx +51 -18
  11. package/src/components/icons/AppEmptyIcon.jsx +126 -93
  12. package/src/components/icons/AppListIcon.jsx +101 -71
  13. package/src/components/icons/BellIcon.jsx +78 -0
  14. package/src/components/icons/BillingIcon.jsx +98 -0
  15. package/src/components/icons/CircleArrowLeftIcon.jsx +95 -0
  16. package/src/components/icons/CircleArrowRightIcon.jsx +98 -0
  17. package/src/components/icons/CircleCheckMarkIcon.jsx +41 -29
  18. package/src/components/icons/CircleCloseHoverIcon.jsx +62 -36
  19. package/src/components/icons/CircleCloseIcon.jsx +52 -26
  20. package/src/components/icons/CircleExclamationIcon.jsx +87 -24
  21. package/src/components/icons/CircleTwoArrowsDownIcon.jsx +84 -0
  22. package/src/components/icons/CircleTwoArrowsUpIcon.jsx +87 -0
  23. package/src/components/icons/EnlargeIcon.jsx +85 -0
  24. package/src/components/icons/EntryIcon.jsx +82 -0
  25. package/src/components/icons/ExploreDocIcon.jsx +95 -0
  26. package/src/components/icons/GearIcon.jsx +2 -2
  27. package/src/components/icons/GraphQLIcon.jsx +98 -0
  28. package/src/components/icons/Icons.module.css +6 -0
  29. package/src/components/icons/KeyIcon.jsx +85 -0
  30. package/src/components/icons/LayersIcon.jsx +81 -0
  31. package/src/components/icons/LensIcon.jsx +79 -0
  32. package/src/components/icons/LiveIcon.jsx +60 -18
  33. package/src/components/icons/LogOutIcon.jsx +81 -0
  34. package/src/components/icons/MetricsIcon.jsx +80 -47
  35. package/src/components/icons/PlayIcon.jsx +57 -2
  36. package/src/components/icons/PullRequestIcon.jsx +87 -30
  37. package/src/components/icons/SendIcon.jsx +75 -0
  38. package/src/components/icons/SocialDiscordIcon.jsx +79 -0
  39. package/src/components/icons/SocialGitHubIcon.jsx +98 -0
  40. package/src/components/icons/SocialGitLabIcon.jsx +122 -0
  41. package/src/components/icons/SocialLinkedInIcon.jsx +85 -0
  42. package/src/components/icons/SocialNPMIcon.jsx +77 -0
  43. package/src/components/icons/SocialTwitterIcon.jsx +77 -0
  44. package/src/components/icons/StopIcon.jsx +59 -2
  45. package/src/components/icons/TerminalIcon.jsx +62 -2
  46. package/src/components/icons/{Users2Icon.jsx → TwoUsersIcon.jsx} +4 -4
  47. package/src/components/icons/UpgradeIcon.jsx +70 -1
  48. package/src/components/icons/WorkspaceFailIcon.jsx +112 -0
  49. package/src/components/icons/index.js +47 -5
  50. package/src/stories/PlatformaticIcon.stories.jsx +58 -26
  51. package/src/components/icons/CircleBackIcon.jsx +0 -51
@@ -0,0 +1,79 @@
1
+ import * as React from 'react'
2
+ import PropTypes from 'prop-types'
3
+ import styles from './Icons.module.css'
4
+
5
+ const LensIcon = ({ color, size }) => {
6
+ const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
7
+ let icon = <></>
8
+
9
+ switch (size) {
10
+ case 'small':
11
+ icon = (
12
+ <svg
13
+ width={16}
14
+ height={16}
15
+ viewBox='0 0 16 16'
16
+ fill='none'
17
+ xmlns='http://www.w3.org/2000/svg'
18
+ className={className}
19
+ >
20
+ <circle cx={7} cy={7} r={5} stroke='none' />
21
+ <path d='M14 14L11 11' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
22
+ </svg>
23
+ )
24
+ break
25
+ case 'medium':
26
+ icon = (
27
+ <svg
28
+ width={24}
29
+ height={24}
30
+ viewBox='0 0 24 24'
31
+ fill='none'
32
+ xmlns='http://www.w3.org/2000/svg'
33
+ className={className}
34
+ >
35
+ <circle cx={10.5} cy={10.5} r={7.5} stroke='none' strokeWidth={1.5} />
36
+ <path d='M21 21L16.5 16.5' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
37
+
38
+ </svg>
39
+ )
40
+ break
41
+ case 'large':
42
+ icon = (
43
+ <svg
44
+ width={40}
45
+ height={40}
46
+ viewBox='0 0 40 40'
47
+ fill='none'
48
+ xmlns='http://www.w3.org/2000/svg'
49
+ className={className}
50
+ >
51
+ <circle cx={17.5} cy={17.5} r={12.5} stroke='none' strokeWidth={2} />
52
+ <path d='M35 35L27.5 27.5' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
53
+ </svg>
54
+ )
55
+ break
56
+
57
+ default:
58
+ break
59
+ }
60
+ return icon
61
+ }
62
+
63
+ LensIcon.propTypes = {
64
+ /**
65
+ * color of text, icon and borders
66
+ */
67
+ color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
68
+ /**
69
+ * Size
70
+ */
71
+ size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
72
+ }
73
+
74
+ LensIcon.defaultProps = {
75
+ color: 'main-dark-blue',
76
+ size: 'medium'
77
+ }
78
+
79
+ export default LensIcon
@@ -1,8 +1,12 @@
1
1
  import * as React from 'react'
2
+ import PropTypes from 'prop-types'
2
3
  import styles from './Icons.module.css'
3
- const LiveIcon = ({ color = 'green', size = 'normal' }) => {
4
+
5
+ const LiveIcon = ({ color, size }) => {
4
6
  const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
7
+ const filledClassName = styles[`filled-${color}`]
5
8
  let icon = <></>
9
+
6
10
  switch (size) {
7
11
  case 'small':
8
12
  icon = (
@@ -14,30 +18,68 @@ const LiveIcon = ({ color = 'green', size = 'normal' }) => {
14
18
  xmlns='http://www.w3.org/2000/svg'
15
19
  className={className}
16
20
  >
17
- <circle cx={8} cy={8.75137} r={1.5} fill='none' />
18
- <path
19
- d='M6 6.51529C5.38625 7.06461 5 7.8629 5 8.7514C5 9.6399 5.38625 10.4382 6 10.9875M10 6.51529C10.6137 7.06461 11 7.8629 11 8.7514C11 9.6399 10.6137 10.4382 10 10.9875'
20
- stroke='none'
21
- strokeLinecap='round'
22
- strokeLinejoin='round'
23
- />
24
- <path
25
- d='M11 5.39722C11.9206 6.2212 12.5 7.41863 12.5 8.75138C12.5 10.0841 11.9206 11.2816 11 12.1055M5 5.39722C4.07938 6.2212 3.5 7.41863 3.5 8.75138C3.5 10.0841 4.07938 11.2816 5 12.1055'
26
- stroke='none'
27
- strokeLinecap='round'
28
- />
29
- <path
30
- d='M12 4.27916C13.2275 5.3778 14 6.97437 14 8.75137C14 10.6328 13.134 12.312 11.779 13.412M4.33558 4C2.91494 5.09726 2 6.81747 2 8.75137C2 10.5434 2.78563 12.152 4.03126 13.2514'
31
- stroke='none'
32
- strokeLinecap='round'
33
- />
21
+ <circle cx={8} cy={8.75134} r={1.5} fill='none' className={filledClassName} />
22
+ <path d='M6 6.51526C5.38625 7.06458 5 7.86287 5 8.75137C5 9.63987 5.38625 10.4382 6 10.9875M10 6.51526C10.6137 7.06458 11 7.86287 11 8.75137C11 9.63986 10.6137 10.4382 10 10.9875' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
23
+ <path d='M11 5.39722C11.9206 6.2212 12.5 7.41863 12.5 8.75138C12.5 10.0841 11.9206 11.2816 11 12.1055M5 5.39722C4.07938 6.2212 3.5 7.41863 3.5 8.75138C3.5 10.0841 4.07938 11.2816 5 12.1055' stroke='none' strokeLinecap='round' />
24
+ <path d='M12 4.27916C13.2275 5.3778 14 6.97437 14 8.75137C14 10.6328 13.134 12.312 11.779 13.412M4.33558 4C2.91494 5.09726 2 6.81747 2 8.75137C2 10.5434 2.78563 12.152 4.03126 13.2514' stroke='none' strokeLinecap='round' />
34
25
  </svg>
35
26
  )
36
27
  break
28
+ case 'medium':
29
+ icon = (
30
+ <svg
31
+ width={24}
32
+ height={24}
33
+ viewBox='0 0 24 24'
34
+ fill='none'
35
+ xmlns='http://www.w3.org/2000/svg'
36
+ className={className}
37
+ >
38
+ <circle cx={12} cy={13.1271} r={2.25} fill='none' className={filledClassName} />
39
+ <path d='M9 9.77295C8.07938 10.5969 7.5 11.7944 7.5 13.1271C7.5 14.4599 8.07938 15.6573 9 16.4813M15 9.77295C15.9206 10.5969 16.5 11.7944 16.5 13.1271C16.5 14.4599 15.9206 15.6573 15 16.4813' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
40
+ <path d='M16.5 8.09583C17.8809 9.3318 18.75 11.1279 18.75 13.1271C18.75 15.1262 17.8809 16.9223 16.5 18.1583M7.5 8.09583C6.11906 9.3318 5.25 11.1279 5.25 13.1271C5.25 15.1262 6.11906 16.9223 7.5 18.1583' stroke='none' strokeWidth={1.5} strokeLinecap='round' />
41
+ <path d='M18 6.41874C19.8412 8.0667 21 10.4616 21 13.1271C21 15.9492 19.7011 18.4679 17.6684 20.1181M6.50337 6C4.37242 7.64589 3 10.2262 3 13.1271C3 15.8151 4.17845 18.2279 6.0469 19.8771' stroke='none' strokeWidth={1.5} strokeLinecap='round' />
42
+ </svg>
43
+ )
44
+ break
45
+ case 'large':
46
+ icon = (
47
+ <svg
48
+ width={40}
49
+ height={40}
50
+ viewBox='0 0 40 40'
51
+ fill='none'
52
+ xmlns='http://www.w3.org/2000/svg'
53
+ className={className}
54
+ >
55
+ <circle cx={20} cy={21.8784} r={3.75} fill='none' className={filledClassName} />
56
+ <path d='M15 16.2882C13.4656 17.6615 12.5 19.6572 12.5 21.8785C12.5 24.0997 13.4656 26.0954 15 27.4687M25 16.2882C26.5344 17.6615 27.5 19.6572 27.5 21.8785C27.5 24.0997 26.5344 26.0954 25 27.4687' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
57
+ <path d='M27.5 13.493C29.8016 15.553 31.25 18.5466 31.25 21.8784C31.25 25.2103 29.8016 28.2039 27.5 30.2638M12.5 13.493C10.1984 15.553 8.75 18.5466 8.75 21.8784C8.75 25.2103 10.1984 28.2039 12.5 30.2638' stroke='none' strokeWidth={2} strokeLinecap='round' />
58
+ <path d='M30 10.6979C33.0687 13.4445 35 17.4359 35 21.8784C35 26.582 32.8351 30.7799 29.4474 33.5301M10.8389 10C7.28736 12.7431 5 17.0437 5 21.8784C5 26.3585 6.96408 30.3799 10.0782 33.1284' stroke='none' strokeWidth={2} strokeLinecap='round' />
59
+ </svg>
60
+ )
61
+ break
62
+
37
63
  default:
38
64
  break
39
65
  }
40
66
  return icon
41
67
  }
42
68
 
69
+ LiveIcon.propTypes = {
70
+ /**
71
+ * color of text, icon and borders
72
+ */
73
+ color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
74
+ /**
75
+ * Size
76
+ */
77
+ size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
78
+ }
79
+
80
+ LiveIcon.defaultProps = {
81
+ color: 'main-dark-blue',
82
+ size: 'medium'
83
+ }
84
+
43
85
  export default LiveIcon
@@ -0,0 +1,81 @@
1
+ import * as React from 'react'
2
+ import PropTypes from 'prop-types'
3
+ import styles from './Icons.module.css'
4
+
5
+ const LogOutIcon = ({ color, size }) => {
6
+ const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
7
+ let icon = <></>
8
+
9
+ switch (size) {
10
+ case 'small':
11
+ icon = (
12
+ <svg
13
+ width={16}
14
+ height={16}
15
+ viewBox='0 0 16 16'
16
+ fill='none'
17
+ xmlns='http://www.w3.org/2000/svg'
18
+ className={className}
19
+ >
20
+ <path d='M8.38687 5.5V3C8.38687 2.44772 7.93915 2 7.38687 2H3C2.44772 2 2 2.44772 2 3V13C2 13.5523 2.44771 14 3 14H7.38687C7.93915 14 8.38687 13.5523 8.38687 13V11.5' stroke='none' strokeLinecap='round' />
21
+ <path d='M10.7742 5.3031L14 8.33356L10.7742 11.364' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
22
+ <path d='M13.3548 8.3335L6.25796 8.3335' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
23
+ </svg>
24
+ )
25
+ break
26
+ case 'medium':
27
+ icon = (
28
+ <svg
29
+ width={24}
30
+ height={24}
31
+ viewBox='0 0 24 24'
32
+ fill='none'
33
+ xmlns='http://www.w3.org/2000/svg'
34
+ className={className}
35
+ >
36
+ <path d='M12.5803 8.25V4C12.5803 3.44772 12.1326 3 11.5803 3H4C3.44772 3 3 3.44772 3 4V20C3 20.5523 3.44772 21 4 21H11.5803C12.1326 21 12.5803 20.5523 12.5803 20V17.25' stroke='none' strokeWidth={1.5} strokeLinecap='round' />
37
+ <path d='M16.1611 7.95459L20.9999 12.5003L16.1611 17.046' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
38
+ <path d='M20.0321 12.5003L9.38681 12.5003' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
39
+ </svg>
40
+ )
41
+ break
42
+ case 'large':
43
+ icon = (
44
+ <svg
45
+ width={40}
46
+ height={40}
47
+ viewBox='0 0 40 40'
48
+ fill='none'
49
+ xmlns='http://www.w3.org/2000/svg'
50
+ className={className}
51
+ >
52
+ <path d='M20.9672 13.75V6C20.9672 5.44772 20.5195 5 19.9672 5H6C5.44772 5 5 5.44772 5 6V34C5 34.5523 5.44772 35 6 35H19.9672C20.5195 35 20.9672 34.5523 20.9672 34V28.75' stroke='none' strokeWidth={2} strokeLinecap='round' />
53
+ <path d='M26.9353 13.2577L34.9999 20.8338L26.9353 28.41' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
54
+ <path d='M33.387 20.8338L15.6448 20.8338' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
55
+ </svg>
56
+ )
57
+ break
58
+
59
+ default:
60
+ break
61
+ }
62
+ return icon
63
+ }
64
+
65
+ LogOutIcon.propTypes = {
66
+ /**
67
+ * color of text, icon and borders
68
+ */
69
+ color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
70
+ /**
71
+ * Size
72
+ */
73
+ size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
74
+ }
75
+
76
+ LogOutIcon.defaultProps = {
77
+ color: 'main-dark-blue',
78
+ size: 'medium'
79
+ }
80
+
81
+ export default LogOutIcon
@@ -1,52 +1,85 @@
1
1
  import * as React from 'react'
2
+ import PropTypes from 'prop-types'
2
3
  import styles from './Icons.module.css'
3
- const MetricsIcon = ({ color = 'white' }) => {
4
- const className = styles[`${color}`]
5
- return (
6
- <svg
7
- width={40}
8
- height={40}
9
- viewBox='0 0 40 40'
10
- fill='none'
11
- xmlns='http://www.w3.org/2000/svg'
12
- className={className}
13
- >
14
- <rect
15
- x={10}
16
- y={12.5}
17
- width={5}
18
- height={17.5}
19
- rx={0.5}
20
- stroke='none'
21
- strokeWidth={2}
22
- />
23
- <rect
24
- x={20}
25
- y={20}
26
- width={5}
27
- height={10}
28
- rx={0.5}
29
- stroke='none'
30
- strokeWidth={2}
31
- />
32
- <rect
33
- x={30}
34
- y={5}
35
- width={5}
36
- height={25}
37
- rx={0.5}
38
- stroke='none'
39
- strokeWidth={2}
40
- />
41
- <path
42
- d='M5 5V35H35'
43
- stroke='none'
44
- strokeWidth={2}
45
- strokeLinecap='round'
46
- strokeLinejoin='round'
47
- />
48
- </svg>
49
- )
4
+
5
+ const MetricsIcon = ({ color, size }) => {
6
+ const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
7
+ let icon = <></>
8
+
9
+ switch (size) {
10
+ case 'small':
11
+ icon = (
12
+ <svg
13
+ width={16}
14
+ height={16}
15
+ viewBox='0 0 16 16'
16
+ fill='none'
17
+ xmlns='http://www.w3.org/2000/svg'
18
+ className={className}
19
+ >
20
+ <rect x={4} y={5} width={2} height={7} rx={0.5} stroke='none' />
21
+ <rect x={8} y={8} width={2} height={4} rx={0.5} stroke='none' />
22
+ <rect x={12} y={2} width={2} height={10} rx={0.5} stroke='none' />
23
+ <path d='M2 2V14H14' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
24
+
25
+ </svg>
26
+ )
27
+ break
28
+ case 'medium':
29
+ icon = (
30
+ <svg
31
+ width={24}
32
+ height={24}
33
+ viewBox='0 0 24 24'
34
+ fill='none'
35
+ xmlns='http://www.w3.org/2000/svg'
36
+ className={className}
37
+ >
38
+ <rect x={6} y={7.5} width={3} height={10.5} rx={0.5} stroke='none' strokeWidth={1.5} />
39
+ <rect x={12} y={12} width={3} height={6} rx={0.5} stroke='none' strokeWidth={1.5} />
40
+ <rect x={18} y={3} width={3} height={15} rx={0.5} stroke='none' strokeWidth={1.5} />
41
+ <path d='M3 3V21H21' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
42
+ </svg>
43
+ )
44
+ break
45
+ case 'large':
46
+ icon = (
47
+ <svg
48
+ width={40}
49
+ height={40}
50
+ viewBox='0 0 40 40'
51
+ fill='none'
52
+ xmlns='http://www.w3.org/2000/svg'
53
+ className={className}
54
+ >
55
+ <rect x={10} y={12.5} width={5} height={17.5} rx={0.5} stroke='none' strokeWidth={2} />
56
+ <rect x={20} y={20} width={5} height={10} rx={0.5} stroke='none' strokeWidth={2} />
57
+ <rect x={30} y={5} width={5} height={25} rx={0.5} stroke='none' strokeWidth={2} />
58
+ <path d='M5 5V35H35' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
59
+ </svg>
60
+ )
61
+ break
62
+
63
+ default:
64
+ break
65
+ }
66
+ return icon
67
+ }
68
+
69
+ MetricsIcon.propTypes = {
70
+ /**
71
+ * color of text, icon and borders
72
+ */
73
+ color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
74
+ /**
75
+ * Size
76
+ */
77
+ size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
78
+ }
79
+
80
+ MetricsIcon.defaultProps = {
81
+ color: 'main-dark-blue',
82
+ size: 'medium'
50
83
  }
51
84
 
52
85
  export default MetricsIcon
@@ -1,20 +1,75 @@
1
1
  import * as React from 'react'
2
+ import PropTypes from 'prop-types'
2
3
  import styles from './Icons.module.css'
3
- const PlayIcon = ({ color = 'green', size = 'normal' }) => {
4
+
5
+ const PlayIcon = ({ color, size }) => {
4
6
  const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
5
7
  let icon = <></>
8
+
6
9
  switch (size) {
7
10
  case 'small':
8
11
  icon = (
9
- <svg width={16} height={16} viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg' className={className}>
12
+ <svg
13
+ width={16}
14
+ height={16}
15
+ viewBox='0 0 16 16'
16
+ fill='none'
17
+ xmlns='http://www.w3.org/2000/svg'
18
+ className={className}
19
+ >
10
20
  <path d='M2 2L14 8L2 14V2Z' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
11
21
  </svg>
12
22
  )
13
23
  break
24
+ case 'medium':
25
+ icon = (
26
+ <svg
27
+ width={24}
28
+ height={24}
29
+ viewBox='0 0 24 24'
30
+ fill='none'
31
+ xmlns='http://www.w3.org/2000/svg'
32
+ className={className}
33
+ >
34
+ <path d='M3 3L21 12L3 21V3Z' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
35
+ </svg>
36
+ )
37
+ break
38
+ case 'large':
39
+ icon = (
40
+ <svg
41
+ width={40}
42
+ height={40}
43
+ viewBox='0 0 40 40'
44
+ fill='none'
45
+ xmlns='http://www.w3.org/2000/svg'
46
+ className={className}
47
+ >
48
+ <path d='M5 5L35 20L5 35V5Z' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
49
+ </svg>
50
+ )
51
+ break
52
+
14
53
  default:
15
54
  break
16
55
  }
17
56
  return icon
18
57
  }
19
58
 
59
+ PlayIcon.propTypes = {
60
+ /**
61
+ * color of text, icon and borders
62
+ */
63
+ color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
64
+ /**
65
+ * Size
66
+ */
67
+ size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
68
+ }
69
+
70
+ PlayIcon.defaultProps = {
71
+ color: 'main-dark-blue',
72
+ size: 'medium'
73
+ }
74
+
20
75
  export default PlayIcon
@@ -1,35 +1,92 @@
1
1
  import * as React from 'react'
2
+ import PropTypes from 'prop-types'
2
3
  import styles from './Icons.module.css'
3
- const PullRequestIcon = ({ color = 'white' }) => {
4
- const className = styles[`${color}`]
5
- return (
6
- <svg
7
- width={40}
8
- height={40}
9
- fill='none'
10
- xmlns='http://www.w3.org/2000/svg'
11
- className={className}
12
- >
13
- <circle cx={9.5} cy={30.5} r={4.5} stroke='none' strokeWidth={2} />
14
- <circle cx={9.5} cy={9.5} r={4.5} stroke='none' strokeWidth={2} />
15
- <path stroke='none' strokeWidth={2} d='M9 14v12' />
16
- <circle cx={30.5} cy={30.5} r={4.5} stroke='none' strokeWidth={2} />
17
- <path
18
- d='M30.5 26V10.5a1 1 0 0 0-1-1H23'
19
- stroke='none'
20
- strokeWidth={2}
21
- strokeLinecap='round'
22
- strokeLinejoin='round'
23
- />
24
- <path
25
- d='m26 5-4.5 4.5L26 14'
26
- stroke='none'
27
- strokeWidth={2}
28
- strokeLinecap='round'
29
- strokeLinejoin='round'
30
- />
31
- </svg>
32
- )
4
+
5
+ const PullRequestIcon = ({ color, size }) => {
6
+ const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
7
+ let icon = <></>
8
+
9
+ switch (size) {
10
+ case 'small':
11
+ icon = (
12
+ <svg
13
+ width={16}
14
+ height={16}
15
+ viewBox='0 0 16 16'
16
+ fill='none'
17
+ xmlns='http://www.w3.org/2000/svg'
18
+ className={className}
19
+ >
20
+ <circle cx={3.8} cy={12.2} r={1.8} stroke='none' />
21
+ <circle cx={3.8} cy={3.8} r={1.8} stroke='none' />
22
+ <line x1={3.69995} y1={5.59998} x2={3.69995} y2={10.4} stroke='none' />
23
+ <circle cx={12.1999} cy={12.2} r={1.8} stroke='none' />
24
+ <path d='M12.2 10.4V4.80005C12.2 4.24776 11.7522 3.80005 11.2 3.80005H9.19995' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
25
+ <path d='M10.4001 2L8.6001 3.8L10.4001 5.6' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
26
+ </svg>
27
+ )
28
+ break
29
+ case 'medium':
30
+ icon = (
31
+ <svg
32
+ width={24}
33
+ height={24}
34
+ viewBox='0 0 24 24'
35
+ fill='none'
36
+ xmlns='http://www.w3.org/2000/svg'
37
+ className={className}
38
+ >
39
+ <circle cx={5.7} cy={18.3} r={2.7} stroke='none' strokeWidth={1.5} />
40
+ <circle cx={5.7} cy={5.7} r={2.7} stroke='none' strokeWidth={1.5} />
41
+ <line x1={5.55005} y1={8.40002} x2={5.55005} y2={15.6} stroke='none' strokeWidth={1.5} />
42
+ <ellipse cx={18.2999} cy={18.3} rx={2.7} ry={2.7} stroke='none' strokeWidth={1.5} />
43
+ <path d='M18.2998 15.6V6.69995C18.2998 6.14767 17.8521 5.69995 17.2998 5.69995H13.7998' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
44
+ <path d='M15.5999 3L12.8999 5.7L15.5999 8.4' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
45
+
46
+ </svg>
47
+ )
48
+ break
49
+ case 'large':
50
+ icon = (
51
+ <svg
52
+ width={40}
53
+ height={40}
54
+ viewBox='0 0 40 40'
55
+ fill='none'
56
+ xmlns='http://www.w3.org/2000/svg'
57
+ className={className}
58
+ >
59
+ <circle cx={9.5} cy={30.5} r={4.5} stroke='none' strokeWidth={2} />
60
+ <circle cx={9.5} cy={9.5} r={4.5} stroke='none' strokeWidth={2} />
61
+ <line x1={9} y1={14} x2={9} y2={26} stroke='none' strokeWidth={2} />
62
+ <ellipse cx={30.4998} cy={30.5} rx={4.5} ry={4.5} stroke='none' strokeWidth={2} />
63
+ <path d='M30.4998 26V10.5C30.4998 9.94772 30.052 9.5 29.4998 9.5H22.9998' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
64
+ <path d='M26 5L21.5 9.5L26 14' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
65
+
66
+ </svg>
67
+ )
68
+ break
69
+
70
+ default:
71
+ break
72
+ }
73
+ return icon
74
+ }
75
+
76
+ PullRequestIcon.propTypes = {
77
+ /**
78
+ * color of text, icon and borders
79
+ */
80
+ color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
81
+ /**
82
+ * Size
83
+ */
84
+ size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
85
+ }
86
+
87
+ PullRequestIcon.defaultProps = {
88
+ color: 'main-dark-blue',
89
+ size: 'medium'
33
90
  }
34
91
 
35
92
  export default PullRequestIcon
@@ -0,0 +1,75 @@
1
+ import * as React from 'react'
2
+ import PropTypes from 'prop-types'
3
+ import styles from './Icons.module.css'
4
+
5
+ const SendIcon = ({ color, size }) => {
6
+ const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
7
+ let icon = <></>
8
+
9
+ switch (size) {
10
+ case 'small':
11
+ icon = (
12
+ <svg
13
+ width={16}
14
+ height={16}
15
+ viewBox='0 0 16 16'
16
+ fill='none'
17
+ xmlns='http://www.w3.org/2000/svg'
18
+ className={className}
19
+ >
20
+ <path d='M3.84615 8L2 13L14 8L2 3L3.84615 8ZM3.84615 8H8.46154' stroke='#21FA90' strokeLinecap='round' strokeLinejoin='round' />
21
+ </svg>
22
+ )
23
+ break
24
+ case 'medium':
25
+ icon = (
26
+ <svg
27
+ width={24}
28
+ height={24}
29
+ viewBox='0 0 24 24'
30
+ fill='none'
31
+ xmlns='http://www.w3.org/2000/svg'
32
+ className={className}
33
+ >
34
+ <path d='M5.76923 12L3 19.5L21 12L3 4.5L5.76923 12ZM5.76923 12H12.6923' stroke='#21FA90' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
35
+ </svg>
36
+ )
37
+ break
38
+ case 'large':
39
+ icon = (
40
+ <svg
41
+ width={40}
42
+ height={40}
43
+ viewBox='0 0 40 40'
44
+ fill='none'
45
+ xmlns='http://www.w3.org/2000/svg'
46
+ className={className}
47
+ >
48
+ <path d='M9.61538 20L5 32.5L35 20L5 7.5L9.61538 20ZM9.61538 20H21.1538' stroke='#21FA90' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
49
+ </svg>
50
+ )
51
+ break
52
+
53
+ default:
54
+ break
55
+ }
56
+ return icon
57
+ }
58
+
59
+ SendIcon.propTypes = {
60
+ /**
61
+ * color of text, icon and borders
62
+ */
63
+ color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
64
+ /**
65
+ * Size
66
+ */
67
+ size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
68
+ }
69
+
70
+ SendIcon.defaultProps = {
71
+ color: 'main-dark-blue',
72
+ size: 'medium'
73
+ }
74
+
75
+ export default SendIcon