File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
apps/www/src/content/docs/components/amount
packages/raystack/components/amount Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 1
1
export interface AmountProps {
2
2
/**
3
3
* The monetary value to display
4
+ * @default 0
4
5
* @example
5
6
* valueInMinorUnits=true: 1299 => "$12.99"
6
7
* valueInMinorUnits=false: 12.99 => "$12.99"
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { forwardRef } from 'react';
3
3
export interface AmountProps {
4
4
/**
5
5
* The monetary value to display
6
+ * @default 0
6
7
* @example
7
8
* valueInMinorUnits=true: 1299 => "$12.99"
8
9
* valueInMinorUnits=false: 12.99 => "$12.99"
@@ -142,7 +143,7 @@ function isValidCurrency(currency: string): boolean {
142
143
export const Amount = forwardRef < HTMLSpanElement , AmountProps > (
143
144
(
144
145
{
145
- value,
146
+ value = 0 ,
146
147
currency = 'USD' ,
147
148
locale = 'en-US' ,
148
149
hideDecimals = false ,
You can’t perform that action at this time.
0 commit comments