@yorkjs/hive-ui 0.1.7 → 0.1.9
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
CHANGED
|
@@ -7,9 +7,14 @@
|
|
|
7
7
|
background-color var(--containerCard)
|
|
8
8
|
margin-left $WING_BLANK
|
|
9
9
|
margin-right $WING_BLANK
|
|
10
|
+
transition background-color 0.1s
|
|
10
11
|
&.show-top-gutter
|
|
11
12
|
margin-top $GUTTER_BLANK
|
|
12
13
|
&.show-bottom-gutter
|
|
13
14
|
margin-bottom $GUTTER_BLANK
|
|
14
15
|
&.show-top-blank
|
|
15
|
-
margin-top $CARD_BLANK
|
|
16
|
+
margin-top $CARD_BLANK
|
|
17
|
+
&.is-clickable
|
|
18
|
+
cursor pointer
|
|
19
|
+
&:active
|
|
20
|
+
background-color rgba(0, 0, 0, 0.03)
|
|
@@ -10,6 +10,7 @@ export interface CardProps {
|
|
|
10
10
|
showBottomGutter?: boolean
|
|
11
11
|
showTopBlank?: boolean
|
|
12
12
|
children?: React.ReactNode
|
|
13
|
+
clickable?: boolean
|
|
13
14
|
onClick?: () => void
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -17,13 +18,17 @@ const CellCard: React.FC<CardProps> = ({
|
|
|
17
18
|
showTopGutter = false,
|
|
18
19
|
showBottomGutter = false,
|
|
19
20
|
showTopBlank = false,
|
|
21
|
+
clickable,
|
|
20
22
|
onClick,
|
|
21
23
|
className,
|
|
22
24
|
children
|
|
23
25
|
}) => {
|
|
26
|
+
const isClickable = clickable !== undefined ? clickable : !!onClick
|
|
27
|
+
|
|
24
28
|
const combinedClass = formatClassNames(
|
|
25
29
|
styles['card'],
|
|
26
30
|
{
|
|
31
|
+
[styles['is-clickable']]: isClickable,
|
|
27
32
|
[styles['show-top-gutter']]: showTopGutter,
|
|
28
33
|
[styles['show-bottom-gutter']]: showBottomGutter,
|
|
29
34
|
[styles['show-top-blank']]: showTopBlank,
|
|
@@ -5,7 +5,6 @@ $CELL_PADDING_HORIZONTAL = 16PX
|
|
|
5
5
|
$CELL_PADDING_VERTICAL = 14PX
|
|
6
6
|
$TITLE_FONT_SIZE = 16PX
|
|
7
7
|
$VALUE_FONT_SIZE = 14PX
|
|
8
|
-
$DESC_FONT_SIZE = 13PX
|
|
9
8
|
|
|
10
9
|
.cell-card
|
|
11
10
|
border-radius 10PX
|
|
@@ -23,8 +22,8 @@ $DESC_FONT_SIZE = 13PX
|
|
|
23
22
|
padding 6PX $CELL_PADDING_HORIZONTAL 0 $CELL_PADDING_HORIZONTAL
|
|
24
23
|
.desc-text
|
|
25
24
|
color var(--textMuted)
|
|
26
|
-
font-size
|
|
27
|
-
line-height
|
|
25
|
+
font-size 13PX
|
|
26
|
+
line-height 19PX
|
|
28
27
|
display block
|
|
29
28
|
|
|
30
29
|
.cell-group
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
user-select none
|
|
7
7
|
:global
|
|
8
8
|
.keyboard-header
|
|
9
|
-
height
|
|
9
|
+
height 40PX
|
|
10
10
|
display flex
|
|
11
11
|
flex-direction row
|
|
12
12
|
align-items center
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
opacity 0.6
|
|
46
46
|
|
|
47
47
|
.done-text
|
|
48
|
-
font-size
|
|
48
|
+
font-size 14PX
|
|
49
49
|
color var(--primary)
|
|
50
50
|
|
|
51
51
|
.keyboard-grid
|