@platformatic/ui-components 0.1.98 → 0.1.99
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/dist/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Platformatic UI Components</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index.
|
|
7
|
+
<script type="module" crossorigin src="/assets/index.4003550d.js"></script>
|
|
8
8
|
<link rel="stylesheet" href="/assets/index.bf6a37ab.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/package.json
CHANGED
|
@@ -6,13 +6,14 @@ import Icons from './icons'
|
|
|
6
6
|
import styles from './PlatformaticIcon.module.css'
|
|
7
7
|
import { COLORS_ICON, SIZES } from './constants'
|
|
8
8
|
|
|
9
|
-
function PlatformaticIcon ({ iconName, color, onClick, size, classes, tip }) {
|
|
9
|
+
function PlatformaticIcon ({ iconName, color, onClick, size, classes, tip, ...rest }) {
|
|
10
10
|
let icon = <></>
|
|
11
11
|
if (iconName) {
|
|
12
12
|
icon = React.createElement(Icons[`${iconName}`], {
|
|
13
13
|
color,
|
|
14
14
|
size,
|
|
15
|
-
tip
|
|
15
|
+
tip,
|
|
16
|
+
...rest
|
|
16
17
|
})
|
|
17
18
|
if (onClick) {
|
|
18
19
|
let className = styles.cursorPointer
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
|
|
|
3
3
|
import styles from './Icons.module.css'
|
|
4
4
|
import { COLORS_ICON, SIZES } from '../constants'
|
|
5
5
|
|
|
6
|
-
const CircleCheckMarkIcon = ({ color, size }) => {
|
|
6
|
+
const CircleCheckMarkIcon = ({ color, size, checked }) => {
|
|
7
7
|
const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
|
|
8
8
|
let icon = <></>
|
|
9
9
|
|
|
@@ -19,7 +19,7 @@ const CircleCheckMarkIcon = ({ color, size }) => {
|
|
|
19
19
|
className={className}
|
|
20
20
|
>
|
|
21
21
|
<circle cx={8} cy={8} r={6} stroke='none' />
|
|
22
|
-
<path d='M5 8L7.5 10L11 6' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
22
|
+
{checked && <path d='M5 8L7.5 10L11 6' stroke='none' strokeLinecap='round' strokeLinejoin='round' />}
|
|
23
23
|
</svg>
|
|
24
24
|
)
|
|
25
25
|
break
|
|
@@ -34,7 +34,7 @@ const CircleCheckMarkIcon = ({ color, size }) => {
|
|
|
34
34
|
className={className}
|
|
35
35
|
>
|
|
36
36
|
<circle cx={12} cy={12} r={9} stroke='none' strokeWidth={1.5} />
|
|
37
|
-
<path d='M7.5 12L11.25 15L16.5 9' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
37
|
+
{checked && <path d='M7.5 12L11.25 15L16.5 9' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />}
|
|
38
38
|
</svg>
|
|
39
39
|
)
|
|
40
40
|
break
|
|
@@ -49,7 +49,7 @@ const CircleCheckMarkIcon = ({ color, size }) => {
|
|
|
49
49
|
className={className}
|
|
50
50
|
>
|
|
51
51
|
<circle cx={20} cy={20} r={15} stroke='none' strokeWidth={2} />
|
|
52
|
-
<path d='M12.5 20L18.75 25L27.5 15' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
52
|
+
{checked && <path d='M12.5 20L18.75 25L27.5 15' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />}
|
|
53
53
|
</svg>
|
|
54
54
|
)
|
|
55
55
|
break
|
|
@@ -73,7 +73,8 @@ CircleCheckMarkIcon.propTypes = {
|
|
|
73
73
|
|
|
74
74
|
CircleCheckMarkIcon.defaultProps = {
|
|
75
75
|
color: 'main-dark-blue',
|
|
76
|
-
size: 'medium'
|
|
76
|
+
size: 'medium',
|
|
77
|
+
checked: true
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
export default CircleCheckMarkIcon
|