@platformatic/ui-components 0.1.31 → 0.1.33
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.
- package/.github/workflows/ci.yml +26 -26
- package/.nvmrc +1 -1
- package/LICENSE +201 -201
- package/README.md +26 -26
- package/dist/main.css +31 -18
- package/fonts/Montserrat/README.txt +81 -81
- package/index.html +12 -12
- package/index.js +58 -58
- package/package.json +76 -76
- package/postcss.config.cjs +8 -8
- package/public/api-icon-closed.svg +6 -6
- package/public/api-icon.svg +9 -9
- package/src/App.jsx +12 -12
- package/src/components/BorderedBox.jsx +16 -16
- package/src/components/BorderedBox.module.css +2 -2
- package/src/components/BorderedText.jsx +8 -8
- package/src/components/BorderedText.module.css +2 -2
- package/src/components/Box.jsx +14 -14
- package/src/components/Box.module.css +7 -7
- package/src/components/Button.jsx +23 -23
- package/src/components/Button.module.css +20 -20
- package/src/components/Common.module.css +7 -7
- package/src/components/DetailedMetric.jsx +32 -32
- package/src/components/DetailedMetric.module.css +2 -2
- package/src/components/DropDown.jsx +35 -35
- package/src/components/DropDown.module.css +22 -22
- package/src/components/FollowUs.jsx +35 -35
- package/src/components/FollowUs.module.css +11 -11
- package/src/components/GHLoginButton.jsx +14 -14
- package/src/components/HorizontalSeparator.jsx +9 -5
- package/src/components/Input.jsx +11 -11
- package/src/components/Input.module.css +7 -7
- package/src/components/List.jsx +20 -20
- package/src/components/List.module.css +11 -11
- package/src/components/ListElement.jsx +23 -23
- package/src/components/ListElement.module.css +23 -23
- package/src/components/Loadable.jsx +34 -34
- package/src/components/Loadable.module.css +13 -13
- package/src/components/LoginButton.jsx +17 -17
- package/src/components/LoginButton.module.css +7 -7
- package/src/components/LoginButton.test.jsx +25 -25
- package/src/components/Logo.jsx +58 -58
- package/src/components/Main.jsx +33 -33
- package/src/components/MetricValue.jsx +15 -15
- package/src/components/MetricValue.module.css +7 -7
- package/src/components/Modal.jsx +29 -29
- package/src/components/Modal.module.css +24 -24
- package/src/components/Playground.jsx +9 -9
- package/src/components/SearchBar.jsx +63 -33
- package/src/components/SearchBar.module.css +20 -5
- package/src/components/SimpleMetric.jsx +32 -32
- package/src/components/SimpleMetric.module.css +6 -6
- package/src/components/Status.jsx +26 -26
- package/src/components/TabbedWindow.jsx +34 -34
- package/src/components/TabbedWindow.module.css +16 -16
- package/src/components/TextWithLabel.jsx +11 -11
- package/src/components/TextWithLabel.module.css +8 -8
- package/src/components/Versions.jsx +9 -9
- package/src/components/VerticalSeparator.jsx +5 -5
- package/src/components/icons/ApiEmptyIcon.jsx +107 -0
- package/src/components/icons/ApiIcon.jsx +29 -29
- package/src/components/icons/ApiIconClosed.jsx +19 -19
- package/src/components/icons/CloseModalIcon.jsx +26 -26
- package/src/components/icons/PullRequestIcon.jsx +31 -31
- package/src/components/icons/index.js +9 -8
- package/src/components/layouts/Layout.jsx +11 -11
- package/src/components/layouts/TwoColumnsLayout.jsx +12 -12
- package/src/components/layouts/TwoColumnsLayout.module.css +9 -9
- package/src/hooks/useEscapeKey.js +20 -20
- package/src/lib/utils.js +23 -23
- package/src/main.jsx +9 -9
- package/src/stories/BorderedBox.stories.jsx +33 -33
- package/src/stories/BorderedText.stories.jsx +24 -24
- package/src/stories/Button.stories.jsx +107 -107
- package/src/stories/DetailedMetric.stories.jsx +33 -33
- package/src/stories/DropDown.stories.jsx +62 -62
- package/src/stories/FollowUs.stories.jsx +14 -14
- package/src/stories/GHLoginButton.stories.jsx +14 -14
- package/src/stories/HorizontalSeparator.stories.jsx +12 -12
- package/src/stories/Input.stories.jsx +15 -15
- package/src/stories/Introduction.stories.mdx +211 -211
- package/src/stories/List.stories.jsx +29 -29
- package/src/stories/ListElement.stories.jsx +15 -15
- package/src/stories/Loadable.stories.jsx +75 -75
- package/src/stories/LoginButton.stories.jsx +15 -15
- package/src/stories/Logo.stories.jsx +17 -17
- package/src/stories/Modal.stories.jsx +65 -65
- package/src/stories/SearchBar.stories.jsx +28 -27
- package/src/stories/SimpleMetric.stories.jsx +41 -41
- package/src/stories/Status.stories.jsx +31 -31
- package/src/stories/TextWithLabel.stories.jsx +25 -25
- package/src/stories/TwoColumnsLayout.stories.jsx +42 -42
- package/src/styles/main.css +15 -15
- package/tailwind.config.cjs +37 -37
- package/vite.config.js +6 -6
- package/vitest.config.js +14 -14
- package/dist/api-icon-closed.svg +0 -6
- package/dist/api-icon.svg +0 -9
- package/dist/assets/index.5ac5acb7.js +0 -797
- package/dist/assets/index.d3f5882c.css +0 -1
- package/dist/index.html +0 -14
- package/dist/vite.svg +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.box {
|
|
2
|
-
@apply
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.justifyCentered {
|
|
6
|
-
@apply justify-center;
|
|
7
|
-
}
|
|
1
|
+
.box {
|
|
2
|
+
@apply p-5 m-0 md:p-0 md:m-24 flex flex-col;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.justifyCentered {
|
|
6
|
+
@apply justify-center;
|
|
7
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import React from 'react'
|
|
4
|
-
import styles from './Button.module.css'
|
|
5
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
6
|
-
export default function Button (props) {
|
|
7
|
-
const { icon, label, primary, color, disabled } = props
|
|
8
|
-
let buttonClass = 'primary'
|
|
9
|
-
if (!primary) {
|
|
10
|
-
buttonClass = 'secondary'
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
let colorClass = 'green'
|
|
14
|
-
if (color === 'red') {
|
|
15
|
-
colorClass = 'red'
|
|
16
|
-
}
|
|
17
|
-
return (
|
|
18
|
-
<button className={`${styles.button} ${styles[buttonClass + '-' + colorClass]} ${disabled ? styles.disabled : null}`} disabled={disabled} {...props}>
|
|
19
|
-
{icon ? <FontAwesomeIcon icon={icon} className='mr-2' data-testid='button-icon' /> : null}
|
|
20
|
-
<span>{label}</span>
|
|
21
|
-
</button>
|
|
22
|
-
)
|
|
23
|
-
}
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import React from 'react'
|
|
4
|
+
import styles from './Button.module.css'
|
|
5
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
6
|
+
export default function Button (props) {
|
|
7
|
+
const { icon, label, primary, color, disabled } = props
|
|
8
|
+
let buttonClass = 'primary'
|
|
9
|
+
if (!primary) {
|
|
10
|
+
buttonClass = 'secondary'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let colorClass = 'green'
|
|
14
|
+
if (color === 'red') {
|
|
15
|
+
colorClass = 'red'
|
|
16
|
+
}
|
|
17
|
+
return (
|
|
18
|
+
<button className={`${styles.button} ${styles[buttonClass + '-' + colorClass]} ${disabled ? styles.disabled : null}`} disabled={disabled} {...props}>
|
|
19
|
+
{icon ? <FontAwesomeIcon icon={icon} className='mr-2' data-testid='button-icon' /> : null}
|
|
20
|
+
<span>{label}</span>
|
|
21
|
+
</button>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
.button {
|
|
2
|
-
@apply py-2 px-2 rounded text-center cursor-pointer
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.primary-green {
|
|
6
|
-
@apply text-main-dark-blue bg-light-green;
|
|
7
|
-
}
|
|
8
|
-
.secondary-green {
|
|
9
|
-
@apply border-main-green text-main-green bg-none border border-solid box-border rounded-md font-normal;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.primary-red {
|
|
13
|
-
@apply text-main-dark-blue bg-error-red;
|
|
14
|
-
}
|
|
15
|
-
.secondary-red {
|
|
16
|
-
@apply border-error-red text-error-red bg-none border border-solid box-border rounded-md font-normal;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.disabled {
|
|
20
|
-
@apply bg-opacity-30 cursor-default;
|
|
1
|
+
.button {
|
|
2
|
+
@apply py-2 px-2 rounded text-center cursor-pointer
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.primary-green {
|
|
6
|
+
@apply text-main-dark-blue bg-light-green;
|
|
7
|
+
}
|
|
8
|
+
.secondary-green {
|
|
9
|
+
@apply border-main-green text-main-green bg-none border border-solid box-border rounded-md font-normal;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.primary-red {
|
|
13
|
+
@apply text-main-dark-blue bg-error-red;
|
|
14
|
+
}
|
|
15
|
+
.secondary-red {
|
|
16
|
+
@apply border-error-red text-error-red bg-none border border-solid box-border rounded-md font-normal;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.disabled {
|
|
20
|
+
@apply bg-opacity-30 cursor-default;
|
|
21
21
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.padded {
|
|
2
|
-
@apply px-2 py-2.5;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.bordered {
|
|
6
|
-
@apply border border-solid box-border rounded-md;
|
|
7
|
-
}
|
|
1
|
+
.padded {
|
|
2
|
+
@apply px-2 py-2.5;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.bordered {
|
|
6
|
+
@apply border border-solid box-border rounded-md;
|
|
7
|
+
}
|
|
@@ -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,35 +1,35 @@
|
|
|
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 { faChevronLeft, faChevronDown } from '@fortawesome/free-solid-svg-icons'
|
|
7
|
-
export default function DropDown (props) {
|
|
8
|
-
const { 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
|
-
{header}
|
|
17
|
-
{!open && <FontAwesomeIcon className={styles.arrow} icon={faChevronLeft} />}
|
|
18
|
-
{open && <FontAwesomeIcon className={styles.arrow} icon={faChevronDown} />}
|
|
19
|
-
</span>
|
|
20
|
-
{open && (
|
|
21
|
-
<div className={styles.menu}>
|
|
22
|
-
{items.map((item, index) => {
|
|
23
|
-
return (
|
|
24
|
-
<div className={styles.item} key={index}>
|
|
25
|
-
{item}
|
|
26
|
-
</div>
|
|
27
|
-
)
|
|
28
|
-
})}
|
|
29
|
-
</div>
|
|
30
|
-
)}
|
|
31
|
-
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
)
|
|
35
|
-
}
|
|
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 { faChevronLeft, faChevronDown } from '@fortawesome/free-solid-svg-icons'
|
|
7
|
+
export default function DropDown (props) {
|
|
8
|
+
const { 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
|
+
{header}
|
|
17
|
+
{!open && <FontAwesomeIcon className={styles.arrow} icon={faChevronLeft} />}
|
|
18
|
+
{open && <FontAwesomeIcon className={styles.arrow} icon={faChevronDown} />}
|
|
19
|
+
</span>
|
|
20
|
+
{open && (
|
|
21
|
+
<div className={styles.menu}>
|
|
22
|
+
{items.map((item, index) => {
|
|
23
|
+
return (
|
|
24
|
+
<div className={styles.item} key={index}>
|
|
25
|
+
{item}
|
|
26
|
+
</div>
|
|
27
|
+
)
|
|
28
|
+
})}
|
|
29
|
+
</div>
|
|
30
|
+
)}
|
|
31
|
+
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
)
|
|
35
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
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 ml-2;
|
|
14
|
-
}
|
|
15
|
-
.header {
|
|
16
|
-
@apply hover:cursor-pointer
|
|
17
|
-
}
|
|
18
|
-
.menu {
|
|
19
|
-
@apply absolute border-solid border border-main-green p-4 bg-dark-blue mt-8 rounded-md z-[999];
|
|
20
|
-
}
|
|
21
|
-
.item {
|
|
22
|
-
@apply mb-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 ml-2;
|
|
14
|
+
}
|
|
15
|
+
.header {
|
|
16
|
+
@apply hover:cursor-pointer
|
|
17
|
+
}
|
|
18
|
+
.menu {
|
|
19
|
+
@apply absolute border-solid border border-main-green p-4 bg-dark-blue mt-8 rounded-md z-[999];
|
|
20
|
+
}
|
|
21
|
+
.item {
|
|
22
|
+
@apply mb-2
|
|
23
23
|
}
|
|
@@ -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-2 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-2 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-2 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-2 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-96
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.label {
|
|
6
|
-
@apply uppercase text-light-green
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.icon {
|
|
10
|
-
@apply text-white ml-4
|
|
11
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
@apply flex w-96;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.label {
|
|
6
|
+
@apply uppercase text-light-green
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.icon {
|
|
10
|
+
@apply text-white ml-4
|
|
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,5 +1,9 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
export default function HorizontalSeparator () {
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
'use strict'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
export default function HorizontalSeparator ({ marginTop = 4, marginBottom = 4 }) {
|
|
4
|
+
function getClassName () {
|
|
5
|
+
return 'text-dark-green ' + (marginTop === marginBottom ? `my-${marginTop}` : `mt-${marginTop} mb-${marginBottom}`)
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
return <hr className={getClassName()} />
|
|
9
|
+
}
|
package/src/components/Input.jsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import styles from './Input.module.css'
|
|
4
|
-
import commonStyles from './Common.module.css'
|
|
5
|
-
export default function Input ({ placeholder, value, name }) {
|
|
6
|
-
return (
|
|
7
|
-
<div className={`${styles.inputContainer} ${commonStyles.padded}`}>
|
|
8
|
-
<input type='text' name={name} value={value} placeholder={placeholder} className='grow' />
|
|
9
|
-
</div>
|
|
10
|
-
)
|
|
11
|
-
}
|
|
1
|
+
'use strict'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import styles from './Input.module.css'
|
|
4
|
+
import commonStyles from './Common.module.css'
|
|
5
|
+
export default function Input ({ placeholder, value, name }) {
|
|
6
|
+
return (
|
|
7
|
+
<div className={`${styles.inputContainer} ${commonStyles.padded}`}>
|
|
8
|
+
<input type='text' name={name} value={value} placeholder={placeholder} className='grow' />
|
|
9
|
+
</div>
|
|
10
|
+
)
|
|
11
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.inputContainer {
|
|
2
|
-
@apply flex justify-between w-full h-10 text-white border-main-green border border-solid box-border rounded-md;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.input {
|
|
6
|
-
@apply grow focus:outline-none
|
|
7
|
-
}
|
|
1
|
+
.inputContainer {
|
|
2
|
+
@apply flex justify-between w-full h-10 text-white border-main-green border border-solid box-border rounded-md;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.input {
|
|
6
|
+
@apply grow focus:outline-none
|
|
7
|
+
}
|
package/src/components/List.jsx
CHANGED
|
@@ -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
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
3
|
-
import { faCircleCheck } from '@fortawesome/free-regular-svg-icons'
|
|
4
|
-
import styles from './ListElement.module.css'
|
|
5
|
-
export default function List ({ title, detail }) {
|
|
6
|
-
return (
|
|
7
|
-
<div className={styles.container}>
|
|
8
|
-
<div className={styles.iconCol}>
|
|
9
|
-
<div data-testid='list-element-title-icon' className={styles.icon}>
|
|
10
|
-
<FontAwesomeIcon icon={faCircleCheck} />
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
<div className={styles.textCol}>
|
|
14
|
-
<div className={styles.title} data-testid='list-element-title'>
|
|
15
|
-
{title}
|
|
16
|
-
</div>
|
|
17
|
-
<div data-test-id='list-element-detail'>
|
|
18
|
-
{detail}
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
)
|
|
23
|
-
}
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
3
|
+
import { faCircleCheck } from '@fortawesome/free-regular-svg-icons'
|
|
4
|
+
import styles from './ListElement.module.css'
|
|
5
|
+
export default function List ({ title, detail }) {
|
|
6
|
+
return (
|
|
7
|
+
<div className={styles.container}>
|
|
8
|
+
<div className={styles.iconCol}>
|
|
9
|
+
<div data-testid='list-element-title-icon' className={styles.icon}>
|
|
10
|
+
<FontAwesomeIcon icon={faCircleCheck} />
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<div className={styles.textCol}>
|
|
14
|
+
<div className={styles.title} data-testid='list-element-title'>
|
|
15
|
+
{title}
|
|
16
|
+
</div>
|
|
17
|
+
<div data-test-id='list-element-detail'>
|
|
18
|
+
{detail}
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
@apply flex flex-row my-4
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.iconCol {
|
|
6
|
-
@apply flex flex-col w-6
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.icon {
|
|
10
|
-
@apply text-light-green
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.title {
|
|
14
|
-
@apply flex text-light-green font-bold w-full
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.textCol {
|
|
18
|
-
@apply flex flex-col text-white text-justify w-full
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.detailSpace {
|
|
22
|
-
@apply w-6
|
|
23
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
@apply flex flex-row my-4
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.iconCol {
|
|
6
|
+
@apply flex flex-col w-6
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.icon {
|
|
10
|
+
@apply text-light-green
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.title {
|
|
14
|
+
@apply flex text-light-green font-bold w-full
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.textCol {
|
|
18
|
+
@apply flex flex-col text-white text-justify w-full
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.detailSpace {
|
|
22
|
+
@apply w-6
|
|
23
|
+
}
|