@yorkjs/hive-ui 0.1.1 → 0.1.2
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
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
@import '../../styles/mixin.styl'
|
|
2
2
|
@import '../../styles/variable.styl'
|
|
3
3
|
|
|
4
|
-
$CELL_PADDING_HORIZONTAL = 16PX
|
|
5
4
|
$CELL_PADDING_VERTICAL = 14PX
|
|
6
5
|
|
|
7
6
|
.field-card-container
|
|
8
7
|
border-radius 10PX
|
|
9
8
|
background-color var(--containerCard)
|
|
10
|
-
margin 0 $WING_BLANK
|
|
11
|
-
margin-bottom 12PX
|
|
12
9
|
overflow hidden
|
|
13
10
|
|
|
11
|
+
.card-head-wrapper
|
|
12
|
+
padding 0PX $CELL_PADDING_VERTICAL
|
|
13
|
+
|
|
14
14
|
.card-header
|
|
15
15
|
display flex
|
|
16
16
|
flex-direction row
|
|
17
17
|
align-items center
|
|
18
18
|
justify-content space-between
|
|
19
|
-
padding
|
|
19
|
+
padding 13PX 0PX
|
|
20
20
|
position relative
|
|
21
|
-
min-height 48PX
|
|
22
|
-
box-sizing border-box
|
|
23
21
|
halfBorder(bottom, var(--lineBorder))
|
|
24
22
|
|
|
25
23
|
.header-left
|
|
@@ -31,11 +29,11 @@ $CELL_PADDING_VERTICAL = 14PX
|
|
|
31
29
|
|
|
32
30
|
.header-title
|
|
33
31
|
color var(--textTitle)
|
|
34
|
-
font-size
|
|
32
|
+
font-size 14PX
|
|
33
|
+
line-height 1
|
|
35
34
|
lineClamp(1)
|
|
36
35
|
|
|
37
36
|
.edit-icon-wrapper
|
|
38
|
-
padding 4PX 8PX
|
|
39
37
|
margin-left 2PX
|
|
40
38
|
display flex
|
|
41
39
|
align-items center
|
|
@@ -56,8 +54,7 @@ $CELL_PADDING_VERTICAL = 14PX
|
|
|
56
54
|
align-items center
|
|
57
55
|
|
|
58
56
|
.action-text
|
|
59
|
-
color
|
|
60
|
-
font-size
|
|
61
|
-
padding 4PX
|
|
57
|
+
color var(--primary)
|
|
58
|
+
font-size 13PX
|
|
62
59
|
&:active
|
|
63
60
|
opacity 0.6
|
|
@@ -48,30 +48,47 @@ const FieldCard: React.FC<FieldCardProps> = (props) => {
|
|
|
48
48
|
|
|
49
49
|
return (
|
|
50
50
|
<View className={formatClassNames(styles['field-card-container'], className)}>
|
|
51
|
-
<View className={styles['card-
|
|
52
|
-
<View className={styles['header
|
|
53
|
-
{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
<View className={styles['card-head-wrapper']}>
|
|
52
|
+
<View className={styles['card-header']}>
|
|
53
|
+
<View className={styles['header-left']}>
|
|
54
|
+
{
|
|
55
|
+
typeof title === 'string'
|
|
56
|
+
? (
|
|
57
|
+
<Text className={styles['header-title']}>{title}</Text>
|
|
58
|
+
)
|
|
59
|
+
: (
|
|
60
|
+
title
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
{showEditIcon && (
|
|
65
|
+
<View className={styles['edit-icon-wrapper']} onClick={handleEditClick}>
|
|
66
|
+
<Icon
|
|
67
|
+
name='edit'
|
|
68
|
+
size={14}
|
|
69
|
+
className={styles['edit-icon']}
|
|
70
|
+
/>
|
|
71
|
+
</View>
|
|
72
|
+
)}
|
|
73
|
+
</View>
|
|
58
74
|
|
|
59
|
-
{
|
|
60
|
-
<View className={styles['
|
|
61
|
-
|
|
75
|
+
{extra && (
|
|
76
|
+
<View className={styles['header-extra']} onClick={handleExtraClick}>
|
|
77
|
+
{
|
|
78
|
+
typeof extra === 'string' ? (
|
|
79
|
+
<Text
|
|
80
|
+
className={styles['action-text']}
|
|
81
|
+
>
|
|
82
|
+
{extra}
|
|
83
|
+
</Text>
|
|
84
|
+
)
|
|
85
|
+
: (
|
|
86
|
+
extra
|
|
87
|
+
)
|
|
88
|
+
}
|
|
62
89
|
</View>
|
|
63
90
|
)}
|
|
64
91
|
</View>
|
|
65
|
-
|
|
66
|
-
{extra && (
|
|
67
|
-
<View className={styles['header-extra']} onClick={handleExtraClick}>
|
|
68
|
-
{typeof extra === 'string' ? (
|
|
69
|
-
<Text className={styles['action-text']}>{extra}</Text>
|
|
70
|
-
) : (
|
|
71
|
-
extra
|
|
72
|
-
)}
|
|
73
|
-
</View>
|
|
74
|
-
)}
|
|
75
92
|
</View>
|
|
76
93
|
|
|
77
94
|
<View className={styles['card-content']}>
|