@platformatic/ui-components 0.1.48 → 0.1.50

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 (152) hide show
  1. package/.github/workflows/ci.yml +26 -26
  2. package/.nvmrc +1 -1
  3. package/LICENSE +201 -201
  4. package/README.md +30 -30
  5. package/fonts/Montserrat/README.txt +81 -81
  6. package/index.html +12 -12
  7. package/index.js +71 -71
  8. package/package.json +76 -76
  9. package/postcss.config.cjs +8 -8
  10. package/public/api-icon-closed.svg +6 -6
  11. package/public/api-icon.svg +9 -9
  12. package/src/App.jsx +12 -12
  13. package/src/components/BorderedBox.jsx +18 -18
  14. package/src/components/BorderedBox.module.css +8 -8
  15. package/src/components/BorderedText.jsx +8 -8
  16. package/src/components/BorderedText.module.css +2 -2
  17. package/src/components/Box.jsx +14 -14
  18. package/src/components/Box.module.css +7 -7
  19. package/src/components/Button.jsx +95 -95
  20. package/src/components/Button.module.css +127 -127
  21. package/src/components/ButtonFullRounded.jsx +17 -17
  22. package/src/components/ButtonFullRounded.module.css +28 -28
  23. package/src/components/Checkbox.jsx +11 -11
  24. package/src/components/Checkbox.module.css +18 -18
  25. package/src/components/Common.module.css +28 -28
  26. package/src/components/DetailedMetric.jsx +32 -32
  27. package/src/components/DetailedMetric.module.css +2 -2
  28. package/src/components/DropDown.jsx +36 -36
  29. package/src/components/DropDown.module.css +27 -27
  30. package/src/components/FollowUs.jsx +35 -35
  31. package/src/components/FollowUs.module.css +11 -11
  32. package/src/components/GHLoginButton.jsx +14 -14
  33. package/src/components/HorizontalSeparator.jsx +15 -15
  34. package/src/components/HorizontalSeparator.module.css +26 -26
  35. package/src/components/InfoBox.jsx +50 -50
  36. package/src/components/InfoBox.module.css +5 -5
  37. package/src/components/List.jsx +20 -20
  38. package/src/components/List.module.css +11 -11
  39. package/src/components/ListElement.jsx +23 -23
  40. package/src/components/ListElement.module.css +23 -23
  41. package/src/components/Loadable.jsx +34 -34
  42. package/src/components/Loadable.module.css +13 -13
  43. package/src/components/Loader.jsx +22 -22
  44. package/src/components/Loader.module.css +13 -13
  45. package/src/components/LoginButton.jsx +17 -17
  46. package/src/components/LoginButton.module.css +7 -7
  47. package/src/components/LoginButton.test.jsx +25 -25
  48. package/src/components/Logo.jsx +62 -62
  49. package/src/components/Logo.module.css +5 -5
  50. package/src/components/Main.jsx +33 -33
  51. package/src/components/MetricValue.jsx +15 -15
  52. package/src/components/MetricValue.module.css +9 -9
  53. package/src/components/Modal.jsx +93 -93
  54. package/src/components/Modal.module.css +50 -50
  55. package/src/components/PlatformaticIcon.jsx +57 -57
  56. package/src/components/PlatformaticIcon.module.css +2 -2
  57. package/src/components/Playground.jsx +9 -9
  58. package/src/components/SearchBar.jsx +63 -63
  59. package/src/components/SearchBar.module.css +20 -20
  60. package/src/components/Sidebar.jsx +153 -153
  61. package/src/components/Sidebar.module.css +66 -66
  62. package/src/components/SimpleMetric.jsx +28 -28
  63. package/src/components/SimpleMetric.module.css +6 -6
  64. package/src/components/Status.jsx +26 -26
  65. package/src/components/TabbedWindow.jsx +39 -39
  66. package/src/components/TabbedWindow.module.css +16 -16
  67. package/src/components/TextWithLabel.jsx +11 -11
  68. package/src/components/TextWithLabel.module.css +8 -8
  69. package/src/components/Versions.jsx +9 -9
  70. package/src/components/VerticalSeparator.jsx +5 -5
  71. package/src/components/forms/Field.jsx +53 -20
  72. package/src/components/forms/Field.module.css +23 -17
  73. package/src/components/forms/Input.jsx +80 -87
  74. package/src/components/forms/Input.module.css +28 -28
  75. package/src/components/forms/Preview.jsx +75 -77
  76. package/src/components/forms/Preview.module.css +14 -14
  77. package/src/components/forms/ToggleSwitch.jsx +18 -18
  78. package/src/components/forms/ToggleSwitch.module.css +42 -42
  79. package/src/components/forms/index.js +8 -8
  80. package/src/components/icons/ApiEmptyIcon.jsx +107 -107
  81. package/src/components/icons/ApiIcon.jsx +29 -29
  82. package/src/components/icons/ApiIconClosed.jsx +19 -19
  83. package/src/components/icons/AppEmptyIcon.jsx +94 -94
  84. package/src/components/icons/AppIcon.jsx +38 -38
  85. package/src/components/icons/AppListIcon.jsx +73 -73
  86. package/src/components/icons/Calendar1Icon.jsx +54 -54
  87. package/src/components/icons/Calendar7Icon.jsx +55 -55
  88. package/src/components/icons/CalendarIcon.jsx +56 -56
  89. package/src/components/icons/CircleAddIcon.jsx +40 -40
  90. package/src/components/icons/CircleBackIcon.jsx +51 -51
  91. package/src/components/icons/CircleCheckMarkIcon.jsx +66 -0
  92. package/src/components/icons/CircleCloseHoverIcon.jsx +42 -42
  93. package/src/components/icons/CircleCloseIcon.jsx +32 -32
  94. package/src/components/icons/CircleExclamationIcon.jsx +29 -29
  95. package/src/components/icons/CloseIcon.jsx +31 -31
  96. package/src/components/icons/CopyIcon.jsx +75 -46
  97. package/src/components/icons/CreatedWorkspaceIcon.jsx +70 -70
  98. package/src/components/icons/DynamicWorkspaceIcon.jsx +125 -125
  99. package/src/components/icons/EditIcon.jsx +38 -0
  100. package/src/components/icons/GearIcon.jsx +40 -40
  101. package/src/components/icons/Icons.module.css +29 -29
  102. package/src/components/icons/LiveIcon.jsx +43 -43
  103. package/src/components/icons/MetricsIcon.jsx +52 -52
  104. package/src/components/icons/PlayIcon.jsx +20 -20
  105. package/src/components/icons/PullRequestIcon.jsx +35 -35
  106. package/src/components/icons/StaticWorkspaceIcon.jsx +119 -119
  107. package/src/components/icons/StopIcon.jsx +21 -21
  108. package/src/components/icons/TerminalIcon.jsx +22 -22
  109. package/src/components/icons/TriangleExclamationIcon.jsx +26 -26
  110. package/src/components/icons/UpgradeIcon.jsx +48 -48
  111. package/src/components/icons/index.js +63 -59
  112. package/src/components/layouts/Layout.jsx +11 -11
  113. package/src/components/layouts/TwoColumnsLayout.jsx +12 -12
  114. package/src/components/layouts/TwoColumnsLayout.module.css +9 -9
  115. package/src/hooks/useEscapeKey.js +20 -20
  116. package/src/lib/utils.js +23 -23
  117. package/src/main.jsx +9 -9
  118. package/src/stories/BorderedBox.stories.jsx +33 -33
  119. package/src/stories/BorderedText.stories.jsx +24 -24
  120. package/src/stories/Button.stories.jsx +114 -114
  121. package/src/stories/ButtonFullRounded.stories.jsx +61 -61
  122. package/src/stories/Checkbox.stories.jsx +27 -27
  123. package/src/stories/DetailedMetric.stories.jsx +33 -33
  124. package/src/stories/DropDown.stories.jsx +62 -62
  125. package/src/stories/FollowUs.stories.jsx +14 -14
  126. package/src/stories/GHLoginButton.stories.jsx +14 -14
  127. package/src/stories/HorizontalSeparator.stories.jsx +12 -12
  128. package/src/stories/InfoBox.stories.jsx +46 -46
  129. package/src/stories/Introduction.stories.mdx +211 -211
  130. package/src/stories/List.stories.jsx +29 -29
  131. package/src/stories/ListElement.stories.jsx +15 -15
  132. package/src/stories/Loadable.stories.jsx +75 -75
  133. package/src/stories/Loader.stories.jsx +44 -44
  134. package/src/stories/LoginButton.stories.jsx +15 -15
  135. package/src/stories/Logo.stories.jsx +17 -17
  136. package/src/stories/Modal.stories.jsx +100 -100
  137. package/src/stories/PlatformaticIcon.stories.jsx +51 -35
  138. package/src/stories/SearchBar.stories.jsx +28 -28
  139. package/src/stories/Sidebar.stories.jsx +61 -61
  140. package/src/stories/SimpleMetric.stories.jsx +41 -41
  141. package/src/stories/Status.stories.jsx +31 -31
  142. package/src/stories/TextWithLabel.stories.jsx +25 -25
  143. package/src/stories/TwoColumnsLayout.stories.jsx +42 -42
  144. package/src/stories/forms/Field.stories.jsx +89 -81
  145. package/src/stories/forms/Input.stories.jsx +89 -69
  146. package/src/stories/forms/Preview.stories.jsx +57 -57
  147. package/src/stories/forms/ToggleSwitch.stories.jsx +15 -15
  148. package/src/stories/icons/Icons.stories.jsx +74 -74
  149. package/src/styles/main.css +15 -15
  150. package/tailwind.config.cjs +60 -60
  151. package/vite.config.js +6 -6
  152. package/vitest.config.js +14 -14
@@ -1,28 +1,28 @@
1
- .bordered {
2
- @apply border border-solid box-border rounded-md;
3
- }
4
- .bordered--main-green {
5
- @apply border-main-green;
6
- }
7
- .bordered--main-dark-blue {
8
- @apply border-main-dark-blue;
9
- }
10
- .bordered--error-red {
11
- @apply border-error-red;
12
- }
13
-
14
- .error-message {
15
- @apply absolute -bottom-5 text-error-red text-xs px-2;
16
- }
17
-
18
- .padded {
19
- @apply px-2 py-2.5;
20
- }
21
-
22
- .text--green {
23
- @apply text-main-green
24
- }
25
- .text--main-dark-blue {
26
- @apply text-main-dark-blue;
27
- }
28
-
1
+ .bordered {
2
+ @apply border border-solid box-border rounded-md;
3
+ }
4
+ .bordered--main-green {
5
+ @apply border-main-green;
6
+ }
7
+ .bordered--main-dark-blue {
8
+ @apply border-main-dark-blue;
9
+ }
10
+ .bordered--error-red {
11
+ @apply border-error-red;
12
+ }
13
+
14
+ .error-message {
15
+ @apply absolute -bottom-5 text-error-red text-xs px-2;
16
+ }
17
+
18
+ .padded {
19
+ @apply px-2 py-2.5;
20
+ }
21
+
22
+ .text--green {
23
+ @apply text-main-green
24
+ }
25
+ .text--main-dark-blue {
26
+ @apply text-main-dark-blue;
27
+ }
28
+
@@ -1,32 +1,32 @@
1
- 'use strict'
2
-
3
- import React from 'react'
4
- import SimpleMetric from './SimpleMetric'
5
- import HorizontalSeparator from './HorizontalSeparator'
6
- import VerticalSeparator from './VerticalSeparator'
7
- import styles from './DetailedMetric.module.css'
8
- import MetricValue from './MetricValue'
9
- export default function DetailedMetric (props) {
10
- const { leftDetail, rightDetail } = props
11
- return (
12
- <SimpleMetric {...props}>
13
- <HorizontalSeparator />
14
- <div className={styles.detailContainer}>
15
- <MetricValue
16
- pre={leftDetail.pre}
17
- unit={leftDetail.unit}
18
- color={leftDetail.color}
19
- value={leftDetail.value}
20
- />
21
- <VerticalSeparator />
22
- <MetricValue
23
- pre={rightDetail.pre}
24
- unit={rightDetail.unit}
25
- color={rightDetail.color}
26
- value={rightDetail.value}
27
- />
28
- </div>
29
- </SimpleMetric>
30
-
31
- )
32
- }
1
+ 'use strict'
2
+
3
+ import React from 'react'
4
+ import SimpleMetric from './SimpleMetric'
5
+ import HorizontalSeparator from './HorizontalSeparator'
6
+ import VerticalSeparator from './VerticalSeparator'
7
+ import styles from './DetailedMetric.module.css'
8
+ import MetricValue from './MetricValue'
9
+ export default function DetailedMetric (props) {
10
+ const { leftDetail, rightDetail } = props
11
+ return (
12
+ <SimpleMetric {...props}>
13
+ <HorizontalSeparator />
14
+ <div className={styles.detailContainer}>
15
+ <MetricValue
16
+ pre={leftDetail.pre}
17
+ unit={leftDetail.unit}
18
+ color={leftDetail.color}
19
+ value={leftDetail.value}
20
+ />
21
+ <VerticalSeparator />
22
+ <MetricValue
23
+ pre={rightDetail.pre}
24
+ unit={rightDetail.unit}
25
+ color={rightDetail.color}
26
+ value={rightDetail.value}
27
+ />
28
+ </div>
29
+ </SimpleMetric>
30
+
31
+ )
32
+ }
@@ -1,3 +1,3 @@
1
- .detailContainer {
2
- @apply flex items-center justify-around;
1
+ .detailContainer {
2
+ @apply flex items-center justify-around;
3
3
  }
@@ -1,36 +1,36 @@
1
- 'use strict'
2
-
3
- import React, { useState } from 'react'
4
- import styles from './DropDown.module.css'
5
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
6
- import { faChevronRight, faChevronDown } from '@fortawesome/free-solid-svg-icons'
7
- export default function DropDown (props) {
8
- const { pictureUrl, header, items, align = 'left' } = props
9
- const [open, setOpen] = useState(false)
10
- function handleOpen () {
11
- setOpen(!open)
12
- }
13
- return (
14
- <div className={`${styles.dropDown} ${styles[align]}`}>
15
- <span className={styles.header} onClick={handleOpen}>
16
- {pictureUrl && <img src={pictureUrl} height={32} width={32} className={styles.picture} />}
17
- {header}
18
- {!open && <FontAwesomeIcon className={styles.arrow} icon={faChevronRight} />}
19
- {open && <FontAwesomeIcon className={styles.arrow} icon={faChevronDown} />}
20
- </span>
21
- {open && (
22
- <div className={styles.menu}>
23
- {items.map((item, index) => {
24
- return (
25
- <div className={styles.item} key={index}>
26
- {item}
27
- </div>
28
- )
29
- })}
30
- </div>
31
- )}
32
-
33
- </div>
34
-
35
- )
36
- }
1
+ 'use strict'
2
+
3
+ import React, { useState } from 'react'
4
+ import styles from './DropDown.module.css'
5
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
6
+ import { faChevronRight, faChevronDown } from '@fortawesome/free-solid-svg-icons'
7
+ export default function DropDown (props) {
8
+ const { pictureUrl, header, items, align = 'left' } = props
9
+ const [open, setOpen] = useState(false)
10
+ function handleOpen () {
11
+ setOpen(!open)
12
+ }
13
+ return (
14
+ <div className={`${styles.dropDown} ${styles[align]}`}>
15
+ <span className={styles.header} onClick={handleOpen}>
16
+ {pictureUrl && <img src={pictureUrl} height={32} width={32} className={styles.picture} />}
17
+ {header}
18
+ {!open && <FontAwesomeIcon className={styles.arrow} icon={faChevronRight} />}
19
+ {open && <FontAwesomeIcon className={styles.arrow} icon={faChevronDown} />}
20
+ </span>
21
+ {open && (
22
+ <div className={styles.menu}>
23
+ {items.map((item, index) => {
24
+ return (
25
+ <div className={styles.item} key={index}>
26
+ {item}
27
+ </div>
28
+ )
29
+ })}
30
+ </div>
31
+ )}
32
+
33
+ </div>
34
+
35
+ )
36
+ }
@@ -1,28 +1,28 @@
1
- .dropDown {
2
- @apply mx-4 relative flex flex-col;
3
- }
4
-
5
- .right {
6
- @apply items-end;
7
- }
8
-
9
- .left {
10
- @apply items-start;
11
- }
12
- .arrow {
13
- @apply absolute top-[50%] right-0 translate-y-[-50%];
14
- }
15
- .header {
16
- @apply flex items-center hover:cursor-pointer relative pr-6 tracking-more-widest uppercase text-sm font-normal;
17
- }
18
- .picture {
19
- @apply border border-transparent rounded-full mr-2;
20
- }
21
- .menu {
22
- @apply absolute border-solid border border-white px-0 py-1 bg-light-blue mt-8 rounded-md z-10 text-sm min-w-[175px];
23
- }
24
- .item {
25
- @apply py-3 px-3 text-main-dark-blue first:border-t-0 text-sm uppercase hover:font-semibold hover:cursor-pointer tracking-more-widest;
26
- /* it's a workaround due to opacity... */
27
- border-top: 1px solid rgba(0, 40, 61, 0.2);;
1
+ .dropDown {
2
+ @apply mx-4 relative flex flex-col;
3
+ }
4
+
5
+ .right {
6
+ @apply items-end;
7
+ }
8
+
9
+ .left {
10
+ @apply items-start;
11
+ }
12
+ .arrow {
13
+ @apply absolute top-[50%] right-0 translate-y-[-50%];
14
+ }
15
+ .header {
16
+ @apply flex items-center hover:cursor-pointer relative pr-6 tracking-more-widest uppercase text-sm font-normal;
17
+ }
18
+ .picture {
19
+ @apply border border-transparent rounded-full mr-2;
20
+ }
21
+ .menu {
22
+ @apply absolute border-solid border border-white px-0 py-1 bg-light-blue mt-8 rounded-md z-10 text-sm min-w-[175px];
23
+ }
24
+ .item {
25
+ @apply py-3 px-3 text-main-dark-blue first:border-t-0 text-sm uppercase hover:font-semibold hover:cursor-pointer tracking-more-widest;
26
+ /* it's a workaround due to opacity... */
27
+ border-top: 1px solid rgba(0, 40, 61, 0.2);;
28
28
  }
@@ -1,35 +1,35 @@
1
- import React from 'react'
2
- import styles from './FollowUs.module.css'
3
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
4
- import { faGithub, faTwitter, faLinkedin, faDiscord } from '@fortawesome/free-brands-svg-icons'
5
-
6
- export default function FollowUs ({ label = 'FOLLOW US ON' }) {
7
- return (
8
- <div className={styles.container}>
9
- <div className={styles.label}>
10
- {label}
11
- </div>
12
- <div className={styles.icon}>
13
- <a href='https://twitter.com/platformatic' target='_blank' rel='noopener noreferrer'>
14
- <FontAwesomeIcon icon={faTwitter} className='mr-3 text-white' />
15
- </a>
16
- </div>
17
- <div className={styles.icon}>
18
- <a href='https://www.linkedin.com/company/platformatic/' target='_blank' rel='noopener noreferrer'>
19
- <FontAwesomeIcon icon={faLinkedin} className='mr-3 text-white' />
20
- </a>
21
- </div>
22
- <div className={styles.icon}>
23
- <a href='https://github.com/platformatic' target='_blank' rel='noopener noreferrer'>
24
- <FontAwesomeIcon icon={faGithub} className='mr-2 text-white' />
25
- </a>
26
- </div>
27
- <div className={styles.icon}>
28
- <a href='https://discord.gg/platformatic' target='_blank' rel='noopener noreferrer'>
29
- <FontAwesomeIcon icon={faDiscord} className='mr-2 text-white' />
30
- </a>
31
- </div>
32
-
33
- </div>
34
- )
35
- }
1
+ import React from 'react'
2
+ import styles from './FollowUs.module.css'
3
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
4
+ import { faGithub, faTwitter, faLinkedin, faDiscord } from '@fortawesome/free-brands-svg-icons'
5
+
6
+ export default function FollowUs ({ label = 'FOLLOW US ON' }) {
7
+ return (
8
+ <div className={styles.container}>
9
+ <div className={styles.label}>
10
+ {label}
11
+ </div>
12
+ <div className={styles.icon}>
13
+ <a href='https://twitter.com/platformatic' target='_blank' rel='noopener noreferrer'>
14
+ <FontAwesomeIcon icon={faTwitter} className='mr-3 text-white' />
15
+ </a>
16
+ </div>
17
+ <div className={styles.icon}>
18
+ <a href='https://www.linkedin.com/company/platformatic/' target='_blank' rel='noopener noreferrer'>
19
+ <FontAwesomeIcon icon={faLinkedin} className='mr-3 text-white' />
20
+ </a>
21
+ </div>
22
+ <div className={styles.icon}>
23
+ <a href='https://github.com/platformatic' target='_blank' rel='noopener noreferrer'>
24
+ <FontAwesomeIcon icon={faGithub} className='mr-2 text-white' />
25
+ </a>
26
+ </div>
27
+ <div className={styles.icon}>
28
+ <a href='https://discord.gg/platformatic' target='_blank' rel='noopener noreferrer'>
29
+ <FontAwesomeIcon icon={faDiscord} className='mr-2 text-white' />
30
+ </a>
31
+ </div>
32
+
33
+ </div>
34
+ )
35
+ }
@@ -1,11 +1,11 @@
1
- .container {
2
- @apply flex w-full items-center;
3
- }
4
-
5
- .label {
6
- @apply uppercase text-light-green tracking-more-widest text-sm mr-8;
7
- }
8
-
9
- .icon {
10
- @apply text-white mx-4 text-xl;
11
- }
1
+ .container {
2
+ @apply flex w-full items-center;
3
+ }
4
+
5
+ .label {
6
+ @apply uppercase text-light-green tracking-more-widest text-sm mr-8;
7
+ }
8
+
9
+ .icon {
10
+ @apply text-white mx-4 text-xl;
11
+ }
@@ -1,14 +1,14 @@
1
- import React from 'react'
2
- import LoginButton from './LoginButton'
3
- import { faGithub } from '@fortawesome/free-brands-svg-icons'
4
-
5
- export default function GHLoginButton ({ onClick, ...props }) {
6
- return (
7
- <LoginButton
8
- label='Continue with Github'
9
- onClick={onClick}
10
- icon={faGithub}
11
- {...props}
12
- />
13
- )
14
- }
1
+ import React from 'react'
2
+ import LoginButton from './LoginButton'
3
+ import { faGithub } from '@fortawesome/free-brands-svg-icons'
4
+
5
+ export default function GHLoginButton ({ onClick, ...props }) {
6
+ return (
7
+ <LoginButton
8
+ label='Continue with Github'
9
+ onClick={onClick}
10
+ icon={faGithub}
11
+ {...props}
12
+ />
13
+ )
14
+ }
@@ -1,15 +1,15 @@
1
- 'use strict'
2
- import React from 'react'
3
- import styles from './HorizontalSeparator.module.css'
4
- export default function HorizontalSeparator ({ marginTop = 4, marginBottom = 4, color = 'dark-green', opacity = 1 }) {
5
- function getClassName () {
6
- let className = `text-${color} `
7
- // margin
8
- className += (marginTop === marginBottom ? `${styles['marginY-' + marginTop]}` : `${styles['marginT-' + marginTop]} ${styles['marginB-' + marginBottom]}`)
9
- // opacity
10
- if (opacity > 1) className += ' ' + styles[`apply-opacity-${opacity}`]
11
- return className
12
- }
13
-
14
- return <hr className={getClassName()} />
15
- }
1
+ 'use strict'
2
+ import React from 'react'
3
+ import styles from './HorizontalSeparator.module.css'
4
+ export default function HorizontalSeparator ({ marginTop = 4, marginBottom = 4, color = 'dark-green', opacity = 1 }) {
5
+ function getClassName () {
6
+ let className = `text-${color} `
7
+ // margin
8
+ className += (marginTop === marginBottom ? `${styles['marginY-' + marginTop]}` : `${styles['marginT-' + marginTop]} ${styles['marginB-' + marginBottom]}`)
9
+ // opacity
10
+ if (opacity > 1) className += ' ' + styles[`apply-opacity-${opacity}`]
11
+ return className
12
+ }
13
+
14
+ return <hr className={getClassName()} />
15
+ }
@@ -1,27 +1,27 @@
1
- .marginY-4 {
2
- @apply my-4;
3
- }
4
-
5
- .marginT-4 {
6
- @apply mt-4;
7
- }
8
-
9
- .marginB-4 {
10
- @apply mb-4;
11
- }
12
-
13
- .marginY-10 {
14
- @apply my-10;
15
- }
16
-
17
- .marginT-10 {
18
- @apply mt-10;
19
- }
20
-
21
- .marginB-10 {
22
- @apply mb-10;
23
- }
24
-
25
- .apply-opacity-20 {
26
- @apply opacity-20;
1
+ .marginY-4 {
2
+ @apply my-4;
3
+ }
4
+
5
+ .marginT-4 {
6
+ @apply mt-4;
7
+ }
8
+
9
+ .marginB-4 {
10
+ @apply mb-4;
11
+ }
12
+
13
+ .marginY-10 {
14
+ @apply my-10;
15
+ }
16
+
17
+ .marginT-10 {
18
+ @apply mt-10;
19
+ }
20
+
21
+ .marginB-10 {
22
+ @apply mb-10;
23
+ }
24
+
25
+ .apply-opacity-20 {
26
+ @apply opacity-20;
27
27
  }
@@ -1,50 +1,50 @@
1
- 'use strict'
2
- import React from 'react'
3
- import PropTypes from 'prop-types'
4
- import styles from './InfoBox.module.css'
5
- import Button from './Button'
6
- import PlatformaticIcon from './PlatformaticIcon'
7
-
8
- function InfoBox ({ children, iconLogo, helpText, buttonProps }) {
9
- return (
10
- <div className={styles.container}>
11
- <PlatformaticIcon size='extra-large' iconName={iconLogo} />
12
- {children}
13
- <p className={styles.helpText}>{helpText}</p>
14
- {buttonProps && (<Button type='button' size='extra-large' label={buttonProps.label} color={buttonProps.color} backgroundColor={buttonProps.backgroundColor} onClick={() => buttonProps.onClick()} fullWidth bold />)}
15
- </div>
16
- )
17
- }
18
-
19
- InfoBox.propTypes = {
20
- /**
21
- * children
22
- */
23
- children: PropTypes.node,
24
- /**
25
- * iconLogo
26
- */
27
- iconLogo: PropTypes.string,
28
- /**
29
- * helpText
30
- */
31
- helpText: PropTypes.string,
32
- /**
33
- * background color of the button
34
- */
35
- buttonProps: PropTypes.shape({
36
- label: PropTypes.string,
37
- backgroundColor: PropTypes.string,
38
- color: PropTypes.string,
39
- onClick: PropTypes.func
40
- })
41
- }
42
-
43
- InfoBox.defaultProps = {
44
- children: null,
45
- iconLogo: null,
46
- helpText: null,
47
- buttonProps: null
48
- }
49
-
50
- export default InfoBox
1
+ 'use strict'
2
+ import React from 'react'
3
+ import PropTypes from 'prop-types'
4
+ import styles from './InfoBox.module.css'
5
+ import Button from './Button'
6
+ import PlatformaticIcon from './PlatformaticIcon'
7
+
8
+ function InfoBox ({ children, iconLogo, helpText, buttonProps }) {
9
+ return (
10
+ <div className={styles.container}>
11
+ <PlatformaticIcon size='extra-large' iconName={iconLogo} />
12
+ {children}
13
+ <p className={styles.helpText}>{helpText}</p>
14
+ {buttonProps && (<Button type='button' size='extra-large' label={buttonProps.label} color={buttonProps.color} backgroundColor={buttonProps.backgroundColor} onClick={() => buttonProps.onClick()} fullWidth bold />)}
15
+ </div>
16
+ )
17
+ }
18
+
19
+ InfoBox.propTypes = {
20
+ /**
21
+ * children
22
+ */
23
+ children: PropTypes.node,
24
+ /**
25
+ * iconLogo
26
+ */
27
+ iconLogo: PropTypes.string,
28
+ /**
29
+ * helpText
30
+ */
31
+ helpText: PropTypes.string,
32
+ /**
33
+ * background color of the button
34
+ */
35
+ buttonProps: PropTypes.shape({
36
+ label: PropTypes.string,
37
+ backgroundColor: PropTypes.string,
38
+ color: PropTypes.string,
39
+ onClick: PropTypes.func
40
+ })
41
+ }
42
+
43
+ InfoBox.defaultProps = {
44
+ children: null,
45
+ iconLogo: null,
46
+ helpText: null,
47
+ buttonProps: null
48
+ }
49
+
50
+ export default InfoBox
@@ -1,6 +1,6 @@
1
- .container {
2
- @apply bg-main-dark-blue border-0 rounded-md p-4 flex flex-col items-center gap-y-4 w-full;
3
- }
4
- .helpText {
5
- @apply text-sm text-center mx-6 text-white font-normal;
1
+ .container {
2
+ @apply bg-main-dark-blue border-0 rounded-md p-4 flex flex-col items-center gap-y-4 w-full;
3
+ }
4
+ .helpText {
5
+ @apply text-sm text-center mx-6 text-white font-normal;
6
6
  }
@@ -1,20 +1,20 @@
1
- import React from 'react'
2
- import styles from './List.module.css'
3
-
4
- export default function List ({ title, ...props }) {
5
- return (
6
- <div className={styles.container}>
7
- {title &&
8
- <div
9
- className={styles.title}
10
- data-testid='list-title'
11
- {...props}
12
- >
13
- {title}
14
- </div>}
15
- <div className={styles.elements}>
16
- {props.children}
17
- </div>
18
- </div>
19
- )
20
- }
1
+ import React from 'react'
2
+ import styles from './List.module.css'
3
+
4
+ export default function List ({ title, ...props }) {
5
+ return (
6
+ <div className={styles.container}>
7
+ {title &&
8
+ <div
9
+ className={styles.title}
10
+ data-testid='list-title'
11
+ {...props}
12
+ >
13
+ {title}
14
+ </div>}
15
+ <div className={styles.elements}>
16
+ {props.children}
17
+ </div>
18
+ </div>
19
+ )
20
+ }
@@ -1,11 +1,11 @@
1
- .title {
2
- @apply text-light-green font-bold w-full text-left uppercase
3
- }
4
-
5
- .container {
6
- @apply w-full
7
- }
8
-
9
- .elements {
10
- @apply flex flex-col
11
- }
1
+ .title {
2
+ @apply text-light-green font-bold w-full text-left uppercase
3
+ }
4
+
5
+ .container {
6
+ @apply w-full
7
+ }
8
+
9
+ .elements {
10
+ @apply flex flex-col
11
+ }