minka-ds 0.3.5 → 0.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
|
@@ -36,6 +36,7 @@ export interface StatCardAmountProps extends StatCardBase {
|
|
|
36
36
|
percent?: number
|
|
37
37
|
color?: StatCardColor
|
|
38
38
|
secondary?: string
|
|
39
|
+
subvalue?: string
|
|
39
40
|
badge?: string
|
|
40
41
|
actions?: StatCardAction[]
|
|
41
42
|
onClick?: () => void
|
|
@@ -112,7 +113,7 @@ function StatCard(props: StatCardProps) {
|
|
|
112
113
|
|
|
113
114
|
// Amount
|
|
114
115
|
if (props.type === "amount") {
|
|
115
|
-
const { label, value, unit, percent, color = "default", secondary, badge, actions, onClick, className } = props
|
|
116
|
+
const { label, value, unit, percent, color = "default", secondary, subvalue, badge, actions, onClick, className } = props
|
|
116
117
|
const Comp = onClick ? "button" : "div"
|
|
117
118
|
return (
|
|
118
119
|
<Comp
|
|
@@ -138,7 +139,7 @@ function StatCard(props: StatCardProps) {
|
|
|
138
139
|
<span className="text-heading-1-serif text-[var(--color-text-disabled)]">—</span>
|
|
139
140
|
) : (
|
|
140
141
|
<>
|
|
141
|
-
<span className={cn("text-heading-2-serif
|
|
142
|
+
<span className={cn("text-heading-2-serif tracking-tight", VALUE_COLOR[color])}>
|
|
142
143
|
{value}
|
|
143
144
|
</span>
|
|
144
145
|
{unit && <span className="text-caption text-[var(--color-text-muted)]">{unit}</span>}
|
|
@@ -155,6 +156,7 @@ function StatCard(props: StatCardProps) {
|
|
|
155
156
|
</div>
|
|
156
157
|
)}
|
|
157
158
|
</div>
|
|
159
|
+
{subvalue && <span className="text-caption text-[var(--color-text-muted)]">{subvalue}</span>}
|
|
158
160
|
</Comp>
|
|
159
161
|
)
|
|
160
162
|
}
|