@yorkjs/hive-ui 0.1.6 → 0.1.8
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
|
@@ -22,7 +22,7 @@ export interface AlertProps {
|
|
|
22
22
|
onClose?: () => void
|
|
23
23
|
showAnimation?: boolean
|
|
24
24
|
duration?: number
|
|
25
|
-
|
|
25
|
+
onClick?: () => void
|
|
26
26
|
showArrow?: boolean
|
|
27
27
|
borderRadius?: number
|
|
28
28
|
className?: string
|
|
@@ -47,7 +47,7 @@ const Alert: React.FC<AlertProps> = ({
|
|
|
47
47
|
onClose,
|
|
48
48
|
showAnimation = false,
|
|
49
49
|
duration = 0,
|
|
50
|
-
|
|
50
|
+
onClick,
|
|
51
51
|
showArrow = false,
|
|
52
52
|
borderRadius = 0,
|
|
53
53
|
className,
|
|
@@ -110,7 +110,7 @@ const Alert: React.FC<AlertProps> = ({
|
|
|
110
110
|
handleClose()
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
onClick?.()
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
useEffect(() => {
|
|
@@ -125,7 +125,7 @@ const Alert: React.FC<AlertProps> = ({
|
|
|
125
125
|
return (
|
|
126
126
|
<View
|
|
127
127
|
className={formatClassNames(styles['alert-container'], className, {
|
|
128
|
-
[styles['is-pressable']]: !!
|
|
128
|
+
[styles['is-pressable']]: !!onClick,
|
|
129
129
|
[styles['show-animation']]: showAnimation,
|
|
130
130
|
[styles['is-leaving']]: isLeaving
|
|
131
131
|
})}
|
|
@@ -249,7 +249,7 @@ const Alert: React.FC<AlertProps> = ({
|
|
|
249
249
|
</View>
|
|
250
250
|
)}
|
|
251
251
|
|
|
252
|
-
{(showArrow || (!showArrow &&
|
|
252
|
+
{(showArrow || (!showArrow && onClick)) && !closable && (
|
|
253
253
|
<Icon
|
|
254
254
|
name="right"
|
|
255
255
|
color={config.color}
|
|
@@ -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,
|
|
@@ -14,7 +14,7 @@ interface IProps {
|
|
|
14
14
|
/** 标题 */
|
|
15
15
|
title?: string
|
|
16
16
|
/** 时间或下方副标题 */
|
|
17
|
-
time?: string
|
|
17
|
+
time?: string | React.ReactNode
|
|
18
18
|
/** 右侧金额 */
|
|
19
19
|
amount?: string | number
|
|
20
20
|
/** 金额颜色,不传默认 */
|
|
@@ -80,9 +80,17 @@ const FlowItem: React.FC<IProps> = (props) => {
|
|
|
80
80
|
{
|
|
81
81
|
!isEmpty(time)
|
|
82
82
|
? (
|
|
83
|
-
<
|
|
84
|
-
{
|
|
85
|
-
|
|
83
|
+
<View className="flow-item-time-container">
|
|
84
|
+
{
|
|
85
|
+
typeof time === 'string'
|
|
86
|
+
? (
|
|
87
|
+
<Text className="flow-item-time">{time}</Text>
|
|
88
|
+
)
|
|
89
|
+
: (
|
|
90
|
+
time
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
</View>
|
|
86
94
|
)
|
|
87
95
|
: undefined
|
|
88
96
|
}
|
package/src/util/function.ts
CHANGED
|
@@ -147,7 +147,6 @@ export default function getResponsiveImage(options: IGetResponsiveImageOptions):
|
|
|
147
147
|
const mode = noCrop ? 2 : 1
|
|
148
148
|
finalUrl += `?imageView2/${mode}/${suffix.join('/')}`
|
|
149
149
|
}
|
|
150
|
-
console.log("🚀 ~ getResponsiveImage ~ finalUrl:", finalUrl)
|
|
151
150
|
|
|
152
151
|
return formatAssetUrl(finalUrl)
|
|
153
152
|
}
|