@yorkjs/hive-ui 2.3.6 → 2.3.7

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@yorkjs/hive-ui",
3
- "version": "2.3.6",
3
+ "version": "2.3.7",
4
4
  "description": "Hive UI - Taro React component library",
5
5
  "main": "src/index.ts",
6
6
  "module": "src/index.ts",
@@ -110,10 +110,19 @@
110
110
  align-items flex-end
111
111
  flex-shrink 0
112
112
 
113
+ .flow-item-amount-row
114
+ display flex
115
+ flex-direction row
116
+ align-items center
117
+
113
118
  .flow-item-amount
114
119
  font-size 16PX
115
120
  color var(--textTitle)
116
121
 
122
+ .flow-item-amount-status
123
+ margin-left 5PX
124
+ font-size 16PX
125
+
117
126
  .flow-item-desc
118
127
  margin-top 5PX
119
128
  font-size 12PX
@@ -21,6 +21,10 @@ interface IProps {
21
21
  amount?: string | number
22
22
  /** 金额颜色,不传默认 */
23
23
  amountColor?: string
24
+ /** 金额右侧的状态文字(如"已退款") */
25
+ amountStatus?: string
26
+ /** 状态文字颜色 */
27
+ amountStatusColor?: string
24
28
  /** 右侧下方的描述或状态 */
25
29
  desc?: string
26
30
  /** 描述文字颜色 */
@@ -40,6 +44,8 @@ const FlowItem: React.FC<IProps> = (props) => {
40
44
  titleExtra,
41
45
  amount,
42
46
  amountColor,
47
+ amountStatus,
48
+ amountStatusColor,
43
49
  desc,
44
50
  descColor,
45
51
  showSeparator = true,
@@ -128,12 +134,26 @@ const FlowItem: React.FC<IProps> = (props) => {
128
134
  {
129
135
  amount !== undefined
130
136
  ? (
131
- <Text
132
- className="flow-item-amount"
133
- style={amountColor ? { color: amountColor } : {}}
134
- >
135
- {amount}
136
- </Text>
137
+ <View className="flow-item-amount-row">
138
+ <Text
139
+ className="flow-item-amount"
140
+ style={amountColor ? { color: amountColor } : {}}
141
+ >
142
+ {amount}
143
+ </Text>
144
+ {
145
+ !isEmpty(amountStatus)
146
+ ? (
147
+ <Text
148
+ className="flow-item-amount-status"
149
+ style={amountStatusColor ? { color: amountStatusColor } : {}}
150
+ >
151
+ {amountStatus}
152
+ </Text>
153
+ )
154
+ : undefined
155
+ }
156
+ </View>
137
157
  )
138
158
  : undefined
139
159
  }