@platformatic/ui-components 0.1.52 → 0.1.54

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 (65) hide show
  1. package/README.md +12 -0
  2. package/package.json +1 -1
  3. package/src/components/Modal.jsx +1 -1
  4. package/src/components/Sidebar.jsx +2 -2
  5. package/src/components/SimpleMetric.jsx +1 -1
  6. package/src/components/forms/Preview.jsx +1 -1
  7. package/src/components/icons/AddIcon.jsx +2 -2
  8. package/src/components/icons/AlertIcon.jsx +2 -2
  9. package/src/components/icons/AllInOneIcon.jsx +2 -2
  10. package/src/components/icons/ApiCloudIcon.jsx +2 -2
  11. package/src/components/icons/ApiEmptyIcon.jsx +140 -106
  12. package/src/components/icons/ApiIcon.jsx +2 -2
  13. package/src/components/icons/ApiIconClosed.jsx +51 -18
  14. package/src/components/icons/AppEmptyIcon.jsx +126 -93
  15. package/src/components/icons/AppIcon.jsx +2 -2
  16. package/src/components/icons/AppListIcon.jsx +101 -71
  17. package/src/components/icons/ArrowDownFullIcon.jsx +2 -2
  18. package/src/components/icons/ArrowDownIcon.jsx +2 -2
  19. package/src/components/icons/ArrowLeftIcon.jsx +2 -2
  20. package/src/components/icons/ArrowRightIcon.jsx +2 -2
  21. package/src/components/icons/ArrowUpIcon.jsx +2 -2
  22. package/src/components/icons/BellIcon.jsx +78 -0
  23. package/src/components/icons/BillingIcon.jsx +98 -0
  24. package/src/components/icons/Calendar1DayIcon.jsx +2 -2
  25. package/src/components/icons/Calendar7DaysIcon.jsx +2 -2
  26. package/src/components/icons/CalendarIcon.jsx +2 -2
  27. package/src/components/icons/CircleAddIcon.jsx +2 -2
  28. package/src/components/icons/CircleBackIcon.jsx +46 -24
  29. package/src/components/icons/CircleCheckMarkIcon.jsx +41 -29
  30. package/src/components/icons/CircleCloseHoverIcon.jsx +62 -36
  31. package/src/components/icons/CircleCloseIcon.jsx +52 -26
  32. package/src/components/icons/CircleExclamationIcon.jsx +87 -24
  33. package/src/components/icons/CloseIcon.jsx +2 -2
  34. package/src/components/icons/CopyPasteIcon.jsx +2 -2
  35. package/src/components/icons/DatabaseIcon.jsx +2 -2
  36. package/src/components/icons/EditIcon.jsx +2 -2
  37. package/src/components/icons/EnlargeIcon.jsx +85 -0
  38. package/src/components/icons/EntryIcon.jsx +82 -0
  39. package/src/components/icons/GearIcon.jsx +4 -4
  40. package/src/components/icons/GraphQLIcon.jsx +98 -0
  41. package/src/components/icons/Icons.module.css +6 -0
  42. package/src/components/icons/KeyIcon.jsx +85 -0
  43. package/src/components/icons/LayersIcon.jsx +81 -0
  44. package/src/components/icons/LensIcon.jsx +79 -0
  45. package/src/components/icons/LiveIcon.jsx +60 -18
  46. package/src/components/icons/LogOutIcon.jsx +81 -0
  47. package/src/components/icons/MetricsIcon.jsx +80 -47
  48. package/src/components/icons/PlayIcon.jsx +57 -2
  49. package/src/components/icons/PullRequestIcon.jsx +87 -30
  50. package/src/components/icons/SendIcon.jsx +75 -0
  51. package/src/components/icons/SocialDiscordIcon.jsx +79 -0
  52. package/src/components/icons/SocialGitHubIcon.jsx +98 -0
  53. package/src/components/icons/SocialGitLabIcon.jsx +122 -0
  54. package/src/components/icons/SocialLinkedInIcon.jsx +85 -0
  55. package/src/components/icons/SocialNPMIcon.jsx +77 -0
  56. package/src/components/icons/SocialTwitterIcon.jsx +77 -0
  57. package/src/components/icons/StopIcon.jsx +59 -2
  58. package/src/components/icons/TerminalIcon.jsx +62 -2
  59. package/src/components/icons/UpgradeIcon.jsx +70 -1
  60. package/src/components/icons/Users2Icon.jsx +2 -2
  61. package/src/components/icons/WorkspaceDynamicIcon.jsx +2 -2
  62. package/src/components/icons/WorkspaceReadyIcon.jsx +2 -2
  63. package/src/components/icons/WorkspaceStaticIcon.jsx +2 -2
  64. package/src/components/icons/index.js +33 -1
  65. package/src/stories/PlatformaticIcon.stories.jsx +1 -1
@@ -0,0 +1,98 @@
1
+ import * as React from 'react'
2
+ import PropTypes from 'prop-types'
3
+ import styles from './Icons.module.css'
4
+
5
+ const BillingIcon = ({ color, size }) => {
6
+ const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
7
+ const filledClassName = styles[`filled-${color}`]
8
+
9
+ let icon = <></>
10
+
11
+ switch (size) {
12
+ case 'small':
13
+ icon = (
14
+ <svg
15
+ width={16}
16
+ height={16}
17
+ viewBox='0 0 16 16'
18
+ fill='none'
19
+ xmlns='http://www.w3.org/2000/svg'
20
+ className={className}
21
+ >
22
+ <path d='M12 5V3C12 2.44772 11.5523 2 11 2H3C2.44772 2 2 2.44772 2 3V13C2 13.5523 2.44772 14 3 14H6' stroke='none' strokeLinecap='round' />
23
+ <path d='M4 4H9.55556' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
24
+ <path d='M4 6H6' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
25
+ <path d='M4 8H5' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
26
+ <path d='M10.8332 9.07407C10.8332 9.35021 11.057 9.57407 11.3332 9.57407C11.6093 9.57407 11.8332 9.35021 11.8332 9.07407H10.8332ZM9.99984 9.49999C9.72081 9.49999 9.48985 9.42063 9.34223 9.31811C9.19275 9.21431 9.1665 9.12 9.1665 9.07407H8.1665C8.1665 9.5395 8.43873 9.90816 8.77183 10.1395C9.10678 10.3721 9.54249 10.5 9.99984 10.5V9.49999ZM9.1665 9.07407C9.1665 9.02813 9.19275 8.93382 9.34223 8.83002C9.48985 8.72751 9.72081 8.64814 9.99984 8.64814V7.64814C9.54249 7.64814 9.10678 7.77605 8.77183 8.00865C8.43873 8.23997 8.1665 8.60863 8.1665 9.07407H9.1665ZM9.99984 8.64814C10.2789 8.64814 10.5098 8.72751 10.6574 8.83002C10.8069 8.93382 10.8332 9.02813 10.8332 9.07407H11.8332C11.8332 8.60863 11.5609 8.23997 11.2278 8.00865C10.8929 7.77605 10.4572 7.64814 9.99984 7.64814V8.64814Z' fill='none' className={filledClassName} />
27
+ <path d='M8.66683 10.9259C8.66683 11.4373 9.26378 11.8519 10.0002 11.8519C10.7365 11.8519 11.3335 11.4373 11.3335 10.9259C11.3335 10.4146 10.7365 10 10.0002 10' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
28
+ <path d='M10 7.77778V12.2222' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
29
+ <circle cx={10} cy={10} r={4} stroke='none' />
30
+ </svg>
31
+ )
32
+ break
33
+ case 'medium':
34
+ icon = (
35
+ <svg
36
+ width={24}
37
+ height={24}
38
+ viewBox='0 0 24 24'
39
+ fill='none'
40
+ xmlns='http://www.w3.org/2000/svg'
41
+ className={className}
42
+ >
43
+ <path d='M18 7.5V4C18 3.44772 17.5523 3 17 3H4C3.44772 3 3 3.44772 3 4V20C3 20.5523 3.44772 21 4 21H9' stroke='none' strokeWidth={1.5} strokeLinecap='round' />
44
+ <path d='M6 6H14.3333' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
45
+ <path d='M6 9H9' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
46
+ <path d='M6 12H7.5' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
47
+ <path d='M16.2498 13.6111C16.2498 14.0253 16.5855 14.3611 16.9998 14.3611C17.414 14.3611 17.7498 14.0253 17.7498 13.6111H16.2498ZM14.9998 14.25C14.5812 14.25 14.2348 14.1309 14.0133 13.9772C13.7891 13.8215 13.7498 13.68 13.7498 13.6111H12.2498C12.2498 14.3093 12.6581 14.8622 13.1577 15.2092C13.6602 15.5581 14.3137 15.75 14.9998 15.75V14.25ZM13.7498 13.6111C13.7498 13.5422 13.7891 13.4007 14.0133 13.245C14.2348 13.0913 14.5812 12.9722 14.9998 12.9722V11.4722C14.3137 11.4722 13.6602 11.6641 13.1577 12.013C12.6581 12.36 12.2498 12.9129 12.2498 13.6111H13.7498ZM14.9998 12.9722C15.4183 12.9722 15.7647 13.0913 15.9862 13.245C16.2104 13.4007 16.2498 13.5422 16.2498 13.6111H17.7498C17.7498 12.9129 17.3414 12.36 16.8418 12.013C16.3393 11.6641 15.6858 11.4722 14.9998 11.4722V12.9722Z' fill='none' className={filledClassName} />
48
+ <path d='M13.0002 16.3889C13.0002 17.156 13.8957 17.7778 15.0002 17.7778C16.1048 17.7778 17.0002 17.156 17.0002 16.3889C17.0002 15.6219 16.1048 15 15.0002 15' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
49
+ <path d='M15 11.6667V18.3333' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
50
+ <circle cx={15} cy={15} r={6} stroke='none' strokeWidth={1.5} />
51
+ </svg>
52
+ )
53
+ break
54
+ case 'large':
55
+ icon = (
56
+ <svg
57
+ width={40}
58
+ height={40}
59
+ viewBox='0 0 40 40'
60
+ fill='none'
61
+ xmlns='http://www.w3.org/2000/svg'
62
+ className={className}
63
+ >
64
+ <path d='M30 12.5V6C30 5.44772 29.5523 5 29 5H6C5.44772 5 5 5.44772 5 6V34C5 34.5523 5.44772 35 6 35H15' stroke='none' strokeWidth={2} strokeLinecap='round' />
65
+ <path d='M10 10H23.8889' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
66
+ <path d='M10 15H15' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
67
+ <path d='M10 20H12.5' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
68
+ <path d='M27.3332 22.6852C27.3332 23.2375 27.7809 23.6852 28.3332 23.6852C28.8855 23.6852 29.3332 23.2375 29.3332 22.6852H27.3332ZM24.9998 24C24.2577 24 23.6291 23.7894 23.2132 23.5006C22.7936 23.2092 22.6665 22.9049 22.6665 22.6852H20.6665C20.6665 23.7439 21.2856 24.5969 22.0724 25.1434C22.863 25.6923 23.901 26 24.9998 26V24ZM22.6665 22.6852C22.6665 22.4655 22.7936 22.1611 23.2132 21.8697C23.6291 21.5809 24.2577 21.3704 24.9998 21.3704V19.3704C23.901 19.3704 22.863 19.678 22.0724 20.227C21.2856 20.7734 20.6665 21.6264 20.6665 22.6852H22.6665ZM24.9998 21.3704C25.742 21.3704 26.3706 21.5809 26.7865 21.8697C27.2061 22.1611 27.3332 22.4655 27.3332 22.6852H29.3332C29.3332 21.6264 28.7141 20.7734 27.9273 20.227C27.1367 19.678 26.0986 19.3704 24.9998 19.3704V21.3704Z' fill='none' className={filledClassName} />
69
+ <path d='M21.6671 27.3149C21.6671 28.5933 23.1595 29.6297 25.0004 29.6297C26.8414 29.6297 28.3337 28.5933 28.3337 27.3149C28.3337 26.0364 26.8414 25.0001 25.0004 25.0001' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
70
+ <path d='M25 19.4445V30.5556' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
71
+ <circle cx={25} cy={25} r={10} stroke='none' strokeWidth={2} />
72
+ </svg>
73
+ )
74
+ break
75
+
76
+ default:
77
+ break
78
+ }
79
+ return icon
80
+ }
81
+
82
+ BillingIcon.propTypes = {
83
+ /**
84
+ * color of text, icon and borders
85
+ */
86
+ color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
87
+ /**
88
+ * Size
89
+ */
90
+ size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
91
+ }
92
+
93
+ BillingIcon.defaultProps = {
94
+ color: 'main-dark-blue',
95
+ size: 'medium'
96
+ }
97
+
98
+ export default BillingIcon
@@ -27,7 +27,7 @@ const Calendar1DayIcon = ({ color, size }) => {
27
27
  </svg>
28
28
  )
29
29
  break
30
- case 'normal':
30
+ case 'medium':
31
31
  icon = (
32
32
  <svg
33
33
  width={24}
@@ -84,7 +84,7 @@ Calendar1DayIcon.propTypes = {
84
84
 
85
85
  Calendar1DayIcon.defaultProps = {
86
86
  color: 'main-dark-blue',
87
- size: 'normal'
87
+ size: 'medium'
88
88
  }
89
89
 
90
90
  export default Calendar1DayIcon
@@ -27,7 +27,7 @@ const Calendar7DaysIcon = ({ color, size }) => {
27
27
  </svg>
28
28
  )
29
29
  break
30
- case 'normal':
30
+ case 'medium':
31
31
  icon = (
32
32
  <svg
33
33
  width={24}
@@ -82,7 +82,7 @@ Calendar7DaysIcon.propTypes = {
82
82
 
83
83
  Calendar7DaysIcon.defaultProps = {
84
84
  color: 'main-dark-blue',
85
- size: 'normal'
85
+ size: 'medium'
86
86
  }
87
87
 
88
88
  export default Calendar7DaysIcon
@@ -31,7 +31,7 @@ const CalendarIcon = ({ color, size }) => {
31
31
  </svg>
32
32
  )
33
33
  break
34
- case 'normal':
34
+ case 'medium':
35
35
  icon = (
36
36
  <svg
37
37
  width={24}
@@ -96,7 +96,7 @@ CalendarIcon.propTypes = {
96
96
 
97
97
  CalendarIcon.defaultProps = {
98
98
  color: 'main-dark-blue',
99
- size: 'normal'
99
+ size: 'medium'
100
100
  }
101
101
 
102
102
  export default CalendarIcon
@@ -23,7 +23,7 @@ const CircleAddIcon = ({ color, size }) => {
23
23
  </svg>
24
24
  )
25
25
  break
26
- case 'normal':
26
+ case 'medium':
27
27
  icon = (
28
28
  <svg
29
29
  width={24}
@@ -75,7 +75,7 @@ CircleAddIcon.propTypes = {
75
75
 
76
76
  CircleAddIcon.defaultProps = {
77
77
  color: 'main-dark-blue',
78
- size: 'normal'
78
+ size: 'medium'
79
79
  }
80
80
 
81
81
  export default CircleAddIcon
@@ -1,40 +1,45 @@
1
1
  import * as React from 'react'
2
+ import PropTypes from 'prop-types'
2
3
  import styles from './Icons.module.css'
3
4
 
4
- const CircleBackIcon = ({ color = 'green', size = 'normal' }) => {
5
+ const CircleBackIcon = ({ color, size }) => {
5
6
  const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
6
- let icon = (
7
- <svg
8
- width={26}
9
- height={26}
10
- viewBox='0 0 26 26'
11
- fill='none'
12
- xmlns='http://www.w3.org/2000/svg'
13
- className={className}
14
- >
15
- <circle cx={13} cy={13} r={12} fill='none' stroke='none' />
16
- <path
17
- d='M14.5 7L8.5 13L14.5 19'
18
- stroke='none'
19
- strokeLinecap='round'
20
- strokeLinejoin='round'
21
- />
22
- </svg>
23
- )
7
+ let icon = <></>
8
+
24
9
  switch (size) {
25
10
  case 'small':
26
11
  icon = (
27
12
  <svg
28
- width={18}
29
- height={18}
30
- viewBox='0 0 18 18'
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={8} cy={8} r={7} stroke='none' />
21
+ <path
22
+ d='M9 5L6 9L9 13'
23
+ stroke='none'
24
+ strokeLinecap='round'
25
+ strokeLinejoin='round'
26
+ />
27
+ </svg>
28
+ )
29
+ break
30
+ case 'medium':
31
+ icon = (
32
+ <svg
33
+ width={24}
34
+ height={24}
35
+ viewBox='0 0 24 24'
31
36
  fill='none'
32
37
  xmlns='http://www.w3.org/2000/svg'
33
38
  className={className}
34
39
  >
35
- <circle cx={9} cy={9} r={8} stroke='none' />
40
+ <circle cx={12} cy={12} r={11} fill='none' stroke='none' />
36
41
  <path
37
- d='M10 5L6 9L10 13'
42
+ d='M14.5 7L8.5 13L14.5 19'
38
43
  stroke='none'
39
44
  strokeLinecap='round'
40
45
  strokeLinejoin='round'
@@ -42,10 +47,27 @@ const CircleBackIcon = ({ color = 'green', size = 'normal' }) => {
42
47
  </svg>
43
48
  )
44
49
  break
50
+
45
51
  default:
46
52
  break
47
53
  }
48
54
  return icon
49
55
  }
50
56
 
57
+ CircleBackIcon.propTypes = {
58
+ /**
59
+ * color of text, icon and borders
60
+ */
61
+ color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
62
+ /**
63
+ * Size
64
+ */
65
+ size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
66
+ }
67
+
68
+ CircleBackIcon.defaultProps = {
69
+ color: 'main-dark-blue',
70
+ size: 'medium'
71
+ }
72
+
51
73
  export default CircleBackIcon
@@ -1,9 +1,11 @@
1
1
  import * as React from 'react'
2
+ import PropTypes from 'prop-types'
2
3
  import styles from './Icons.module.css'
3
4
 
4
- const CircleCheckMarkIcon = ({ color = 'green', size = 'small' }) => {
5
+ const CircleCheckMarkIcon = ({ color, size }) => {
5
6
  const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
6
7
  let icon = <></>
8
+
7
9
  switch (size) {
8
10
  case 'small':
9
11
  icon = (
@@ -15,18 +17,23 @@ const CircleCheckMarkIcon = ({ color = 'green', size = 'small' }) => {
15
17
  xmlns='http://www.w3.org/2000/svg'
16
18
  className={className}
17
19
  >
18
- <circle
19
- cx={8}
20
- cy={8}
21
- r={6}
22
- stroke='none'
23
- />
24
- <path
25
- d='M5 8L7.5 10L11 6'
26
- stroke='none'
27
- strokeLinecap='round'
28
- strokeLinejoin='round'
29
- />
20
+ <circle cx={8} cy={8} r={6} stroke='none' />
21
+ <path d='M5 8L7.5 10L11 6' 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={12} cy={12} r={9} stroke='none' strokeWidth={1.5} />
36
+ <path d='M7.5 12L11.25 15L16.5 9' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
30
37
  </svg>
31
38
  )
32
39
  break
@@ -34,33 +41,38 @@ const CircleCheckMarkIcon = ({ color = 'green', size = 'small' }) => {
34
41
  icon = (
35
42
  <svg
36
43
  width={40}
37
- height={41}
38
- viewBox='0 0 40 41'
44
+ height={40}
45
+ viewBox='0 0 40 40'
39
46
  fill='none'
40
47
  xmlns='http://www.w3.org/2000/svg'
41
48
  className={className}
42
49
  >
43
- <circle
44
- cx={20}
45
- cy={20.3334}
46
- r={15}
47
- stroke='none'
48
- strokeWidth={2.5}
49
- />
50
- <path
51
- d='M12.5 20.3334L18.75 25.3334L27.5 15.3334'
52
- stroke='none'
53
- strokeWidth={2.5}
54
- strokeLinecap='round'
55
- strokeLinejoin='round'
56
- />
50
+ <circle cx={20} cy={20} r={15} stroke='none' strokeWidth={2} />
51
+ <path d='M12.5 20L18.75 25L27.5 15' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
57
52
  </svg>
58
53
  )
59
54
  break
55
+
60
56
  default:
61
57
  break
62
58
  }
63
59
  return icon
64
60
  }
65
61
 
62
+ CircleCheckMarkIcon.propTypes = {
63
+ /**
64
+ * color of text, icon and borders
65
+ */
66
+ color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
67
+ /**
68
+ * Size
69
+ */
70
+ size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
71
+ }
72
+
73
+ CircleCheckMarkIcon.defaultProps = {
74
+ color: 'main-dark-blue',
75
+ size: 'medium'
76
+ }
77
+
66
78
  export default CircleCheckMarkIcon
@@ -1,42 +1,68 @@
1
1
  import * as React from 'react'
2
+ import PropTypes from 'prop-types'
2
3
  import styles from './Icons.module.css'
3
4
 
4
- const CircleCloseHoverIcon = ({ color = 'green' }) => {
5
- const className = styles[`${color}`] + ' ' + styles[`fill-circle-${color}`]
6
- return (
7
- <svg
8
- width={24}
9
- height={24}
10
- viewBox='0 0 24 24'
11
- fill='none'
12
- xmlns='http://www.w3.org/2000/svg'
13
- className={className}
14
- >
15
- <circle
16
- cx={12}
17
- cy={12}
18
- r={11.25}
19
- fill='none'
20
- fillOpacity={0.2}
21
- stroke='none'
22
- strokeWidth={1.5}
23
- />
24
- <path
25
- d='M6 6L18 18'
26
- stroke='none'
27
- strokeWidth={1.5}
28
- strokeLinecap='round'
29
- strokeLinejoin='round'
30
- />
31
- <path
32
- d='M6 18L18 6'
33
- stroke='none'
34
- strokeWidth={1.5}
35
- strokeLinecap='round'
36
- strokeLinejoin='round'
37
- />
38
- </svg>
39
- )
5
+ const CircleCloseHoverIcon = ({ color, size }) => {
6
+ const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
7
+ let icon = <></>
8
+
9
+ switch (size) {
10
+ case 'medium':
11
+ icon = (
12
+ <svg
13
+ width={24}
14
+ height={24}
15
+ viewBox='0 0 24 24'
16
+ fill='none'
17
+ xmlns='http://www.w3.org/2000/svg'
18
+ className={className}
19
+ >
20
+ <circle
21
+ cx={12}
22
+ cy={12}
23
+ r={11.25}
24
+ fill='none'
25
+ fillOpacity={0.2}
26
+ stroke='none'
27
+ strokeWidth={1.5}
28
+ />
29
+ <path
30
+ d='M6 6L18 18'
31
+ stroke='none'
32
+ strokeWidth={1.5}
33
+ strokeLinecap='round'
34
+ strokeLinejoin='round'
35
+ />
36
+ <path
37
+ d='M6 18L18 6'
38
+ stroke='none'
39
+ strokeWidth={1.5}
40
+ strokeLinecap='round'
41
+ strokeLinejoin='round'
42
+ />
43
+ </svg>
44
+ )
45
+ break
46
+ default:
47
+ break
48
+ }
49
+ return icon
50
+ }
51
+
52
+ CircleCloseHoverIcon.propTypes = {
53
+ /**
54
+ * color of text, icon and borders
55
+ */
56
+ color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
57
+ /**
58
+ * Size
59
+ */
60
+ size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
61
+ }
62
+
63
+ CircleCloseHoverIcon.defaultProps = {
64
+ color: 'main-dark-blue',
65
+ size: 'medium'
40
66
  }
41
67
 
42
68
  export default CircleCloseHoverIcon
@@ -1,32 +1,58 @@
1
1
  import * as React from 'react'
2
+ import PropTypes from 'prop-types'
2
3
  import styles from './Icons.module.css'
3
4
 
4
- const CircleCloseIcon = ({ color = 'green' }) => {
5
- const className = styles[`${color}`]
6
- return (
7
- <svg
8
- width={24}
9
- height={24}
10
- viewBox='0 0 24 24'
11
- fill='none'
12
- xmlns='http://www.w3.org/2000/svg'
13
- className={className}
14
- >
15
- <circle cx={12} cy={12} r={11.5} stroke='none' />
16
- <path
17
- d='M6 6L18 18'
18
- stroke='none'
19
- strokeLinecap='round'
20
- strokeLinejoin='round'
21
- />
22
- <path
23
- d='M6 18L18 6'
24
- stroke='none'
25
- strokeLinecap='round'
26
- strokeLinejoin='round'
27
- />
28
- </svg>
29
- )
5
+ const CircleCloseIcon = ({ color, size }) => {
6
+ const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
7
+ let icon = <></>
8
+
9
+ switch (size) {
10
+ case 'medium':
11
+ icon = (
12
+ <svg
13
+ width={24}
14
+ height={24}
15
+ viewBox='0 0 24 24'
16
+ fill='none'
17
+ xmlns='http://www.w3.org/2000/svg'
18
+ className={className}
19
+ >
20
+ <circle cx={12} cy={12} r={11.5} stroke='none' />
21
+ <path
22
+ d='M6 6L18 18'
23
+ stroke='none'
24
+ strokeLinecap='round'
25
+ strokeLinejoin='round'
26
+ />
27
+ <path
28
+ d='M6 18L18 6'
29
+ stroke='none'
30
+ strokeLinecap='round'
31
+ strokeLinejoin='round'
32
+ />
33
+ </svg>
34
+ )
35
+ break
36
+ default:
37
+ break
38
+ }
39
+ return icon
40
+ }
41
+
42
+ CircleCloseIcon.propTypes = {
43
+ /**
44
+ * color of text, icon and borders
45
+ */
46
+ color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
47
+ /**
48
+ * Size
49
+ */
50
+ size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
51
+ }
52
+
53
+ CircleCloseIcon.defaultProps = {
54
+ color: 'main-dark-blue',
55
+ size: 'medium'
30
56
  }
31
57
 
32
58
  export default CircleCloseIcon