@platformatic/ui-components 0.1.43 → 0.1.44
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/package.json +1 -1
- package/src/components/Modal.jsx +6 -6
- package/src/components/icons/{RoundCloseHoverIcon.jsx → CircleCloseHoverIcon.jsx} +2 -2
- package/src/components/icons/{RoundCloseIcon.jsx → CircleCloseIcon.jsx} +2 -2
- package/src/components/icons/CloseIcon.jsx +31 -0
- package/src/components/icons/TriangleExclamationIcon.jsx +26 -0
- package/src/components/icons/index.js +9 -7
- package/src/stories/icons/Icons.stories.jsx +35 -0
- package/src/components/icons/CloseModalIcon.jsx +0 -26
- package/src/stories/icons/PullRequestIcon.stories.jsx +0 -20
package/package.json
CHANGED
package/src/components/Modal.jsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
import useEscapeKey from '../hooks/useEscapeKey'
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import CloseIcon from './icons/CloseIcon'
|
|
4
|
+
import CircleCloseIcon from './icons/CircleCloseIcon'
|
|
5
|
+
import CircleCloseHoverIcon from './icons/CircleCloseHoverIcon'
|
|
6
6
|
import Logo from './Logo'
|
|
7
7
|
import HorizontalSeparator from './HorizontalSeparator'
|
|
8
8
|
import styles from './Modal.module.css'
|
|
@@ -25,7 +25,7 @@ export default function Modal (props) {
|
|
|
25
25
|
<div className={styles.header}>
|
|
26
26
|
<div className={styles.title}>{title}</div>
|
|
27
27
|
<div className={styles.close} onClick={() => setIsOpen(false)}>
|
|
28
|
-
<
|
|
28
|
+
<CloseIcon />
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
31
31
|
<div>
|
|
@@ -50,7 +50,7 @@ export default function Modal (props) {
|
|
|
50
50
|
onMouseEnter={() => setIsHoverCloseModal(true)}
|
|
51
51
|
onMouseLeave={() => setIsHoverCloseModal(false)}
|
|
52
52
|
>
|
|
53
|
-
{isHoverCloseModal ? <
|
|
53
|
+
{isHoverCloseModal ? <CircleCloseHoverIcon /> : <CircleCloseIcon />}
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
56
56
|
<p className={styles.titleInvite}>{title}</p>
|
|
@@ -73,7 +73,7 @@ export default function Modal (props) {
|
|
|
73
73
|
onMouseEnter={() => setIsHoverCloseModal(true)}
|
|
74
74
|
onMouseLeave={() => setIsHoverCloseModal(false)}
|
|
75
75
|
>
|
|
76
|
-
{isHoverCloseModal ? <
|
|
76
|
+
{isHoverCloseModal ? <CircleCloseHoverIcon color='main-dark-blue' /> : <CircleCloseIcon color='main-dark-blue' />}
|
|
77
77
|
</div>
|
|
78
78
|
</div>
|
|
79
79
|
<div className={classNameFullScreen}>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import styles from './Icons.module.css'
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const CircleCloseHoverIcon = ({ color = 'green' }) => {
|
|
5
5
|
const className = styles[`${color}`] + ' ' + styles[`fill-circle-${color}`]
|
|
6
6
|
return (
|
|
7
7
|
<svg
|
|
@@ -39,4 +39,4 @@ const RoundCloseHoverIcon = ({ color = 'green' }) => {
|
|
|
39
39
|
)
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
export default
|
|
42
|
+
export default CircleCloseHoverIcon
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import styles from './Icons.module.css'
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const CircleCloseIcon = ({ color = 'green' }) => {
|
|
5
5
|
const className = styles[`${color}`]
|
|
6
6
|
return (
|
|
7
7
|
<svg
|
|
@@ -29,4 +29,4 @@ const RoundCloseIcon = ({ color = 'green' }) => {
|
|
|
29
29
|
)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export default
|
|
32
|
+
export default CircleCloseIcon
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import styles from './Icons.module.css'
|
|
3
|
+
|
|
4
|
+
const CloseIcon = ({ color = 'main-dark-blue' }) => {
|
|
5
|
+
const className = styles[`${color}`]
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
width={16}
|
|
9
|
+
height={16}
|
|
10
|
+
viewBox='0 0 16 16'
|
|
11
|
+
fill='none'
|
|
12
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
13
|
+
className={className}
|
|
14
|
+
>
|
|
15
|
+
<path
|
|
16
|
+
d='M2 2L14 14'
|
|
17
|
+
stroke='none'
|
|
18
|
+
strokeLinecap='round'
|
|
19
|
+
strokeLinejoin='round'
|
|
20
|
+
/>
|
|
21
|
+
<path
|
|
22
|
+
d='M2 14L14 2'
|
|
23
|
+
stroke='none'
|
|
24
|
+
strokeLinecap='round'
|
|
25
|
+
strokeLinejoin='round'
|
|
26
|
+
/>
|
|
27
|
+
</svg>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default CloseIcon
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import styles from './Icons.module.css'
|
|
3
|
+
const TriangleExclamationIcon = ({ color = 'red' }) => {
|
|
4
|
+
const className = styles[`${color}`]
|
|
5
|
+
return (
|
|
6
|
+
<svg
|
|
7
|
+
width={16}
|
|
8
|
+
height={16}
|
|
9
|
+
viewBox='0 0 16 16'
|
|
10
|
+
fill='none'
|
|
11
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
12
|
+
className={className}
|
|
13
|
+
>
|
|
14
|
+
<path d='M14 14H2L8 2L14 14Z' stroke='none' strokeLinejoin='round' />
|
|
15
|
+
<path
|
|
16
|
+
d='M8 6V10.5'
|
|
17
|
+
stroke='none'
|
|
18
|
+
strokeLinecap='round'
|
|
19
|
+
strokeLinejoin='round'
|
|
20
|
+
/>
|
|
21
|
+
<circle cx={8} cy={12} r={0.5} fill='none' />
|
|
22
|
+
</svg>
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default TriangleExclamationIcon
|
|
@@ -5,14 +5,15 @@ import AppIcon from './AppIcon'
|
|
|
5
5
|
import AppListIcon from './AppListIcon'
|
|
6
6
|
import AppEmptyIcon from './AppEmptyIcon'
|
|
7
7
|
import CircleExclamationIcon from './CircleExclamationIcon'
|
|
8
|
-
import
|
|
8
|
+
import CircleCloseIcon from './CircleCloseIcon'
|
|
9
|
+
import CircleCloseHoverIcon from './CircleCloseHoverIcon'
|
|
10
|
+
import CloseIcon from './CloseIcon'
|
|
9
11
|
import GearIcon from './GearIcon'
|
|
10
|
-
import RoundCloseIcon from './RoundCloseIcon'
|
|
11
|
-
import RoundCloseHoverIcon from './RoundCloseHoverIcon'
|
|
12
12
|
import MetricsIcon from './MetricsIcon'
|
|
13
13
|
import PuzzleDynamicIcon from './PuzzleDynamicIcon'
|
|
14
14
|
import PuzzleIcon from './PuzzleIcon'
|
|
15
15
|
import PullRequestIcon from './PullRequestIcon'
|
|
16
|
+
import TriangleExclamationIcon from './TriangleExclamationIcon'
|
|
16
17
|
|
|
17
18
|
export default {
|
|
18
19
|
ApiIcon,
|
|
@@ -22,12 +23,13 @@ export default {
|
|
|
22
23
|
AppListIcon,
|
|
23
24
|
AppEmptyIcon,
|
|
24
25
|
CircleExclamationIcon,
|
|
25
|
-
|
|
26
|
+
CircleCloseIcon,
|
|
27
|
+
CircleCloseHoverIcon,
|
|
28
|
+
CloseIcon,
|
|
26
29
|
GearIcon,
|
|
27
|
-
RoundCloseIcon,
|
|
28
|
-
RoundCloseHoverIcon,
|
|
29
30
|
MetricsIcon,
|
|
30
31
|
PuzzleDynamicIcon,
|
|
31
32
|
PuzzleIcon,
|
|
32
|
-
PullRequestIcon
|
|
33
|
+
PullRequestIcon,
|
|
34
|
+
TriangleExclamationIcon
|
|
33
35
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import PullRequestIcon from '../../components/icons/PullRequestIcon'
|
|
3
|
+
import CloseIcon from '../../components/icons/CloseIcon'
|
|
4
|
+
import CircleCloseIcon from '../../components/icons/CircleCloseIcon'
|
|
5
|
+
import TriangleExclamationIcon from '../../components/icons/TriangleExclamationIcon'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Platformatic/Icons',
|
|
9
|
+
component: PullRequestIcon,
|
|
10
|
+
argTypes: {
|
|
11
|
+
color: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
control: {
|
|
14
|
+
type: 'radio',
|
|
15
|
+
options: ['green', 'white', 'red']
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const PullRequestIconTemplate = (args) => <PullRequestIcon {...args} />
|
|
22
|
+
export const PullRequestIconDefault = PullRequestIconTemplate.bind({})
|
|
23
|
+
PullRequestIconDefault.args = {}
|
|
24
|
+
|
|
25
|
+
const CloseIconTemplate = (args) => <CloseIcon {...args} />
|
|
26
|
+
export const CloseIconDefault = CloseIconTemplate.bind({})
|
|
27
|
+
CloseIconDefault.args = {}
|
|
28
|
+
|
|
29
|
+
const CircleCloseIconTemplate = (args) => <CircleCloseIcon {...args} />
|
|
30
|
+
export const CircleCloseIconDefault = CircleCloseIconTemplate.bind({})
|
|
31
|
+
CircleCloseIconDefault.args = {}
|
|
32
|
+
|
|
33
|
+
const TriangleExclamationIconTemplate = (args) => <TriangleExclamationIcon {...args} />
|
|
34
|
+
export const TriangleExclamationIconDefault = TriangleExclamationIconTemplate.bind({})
|
|
35
|
+
TriangleExclamationIconDefault.args = {}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
|
|
3
|
-
const CloseModalIcon = () => (
|
|
4
|
-
<svg
|
|
5
|
-
width={16}
|
|
6
|
-
height={16}
|
|
7
|
-
viewBox='0 0 16 16'
|
|
8
|
-
fill='none'
|
|
9
|
-
xmlns='http://www.w3.org/2000/svg'
|
|
10
|
-
>
|
|
11
|
-
<path
|
|
12
|
-
d='M2 2L14 14'
|
|
13
|
-
stroke='#00283D'
|
|
14
|
-
strokeLinecap='round'
|
|
15
|
-
strokeLinejoin='round'
|
|
16
|
-
/>
|
|
17
|
-
<path
|
|
18
|
-
d='M2 14L14 2'
|
|
19
|
-
stroke='#00283D'
|
|
20
|
-
strokeLinecap='round'
|
|
21
|
-
strokeLinejoin='round'
|
|
22
|
-
/>
|
|
23
|
-
</svg>
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
export default CloseModalIcon
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PullRequestIcon from '../../components/icons/PullRequestIcon'
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Platformatic/Icons',
|
|
6
|
-
component: PullRequestIcon,
|
|
7
|
-
argTypes: {
|
|
8
|
-
color: {
|
|
9
|
-
type: 'string',
|
|
10
|
-
control: {
|
|
11
|
-
type: 'radio',
|
|
12
|
-
options: ['green', 'white', 'red']
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const Template = (args) => <PullRequestIcon {...args} />
|
|
19
|
-
export const PullRequestIconDefault = Template.bind({})
|
|
20
|
-
PullRequestIconDefault.args = {}
|