File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export type CurrencyInputProps = Omit<
88 locale ?: string ;
99 value ?: number | null ;
1010 allowEmptyValue ?: boolean ;
11+ showPrefix ?: boolean ;
1112 onChange ?: ( value : number | undefined ) => void ;
1213 currencyCode : string ;
1314 currencySymbol ?: string ;
@@ -21,6 +22,7 @@ export const CurrencyInput = React.forwardRef<
2122 locale = 'en' ,
2223 value,
2324 allowEmptyValue = false ,
25+ showPrefix = true ,
2426 onChange,
2527 currencyCode,
2628 currencySymbol,
@@ -107,9 +109,11 @@ export const CurrencyInput = React.forwardRef<
107109 ref = { ref }
108110 type = "text"
109111 prefix = {
110- < div >
111- { getCurrencySymbol ( localeValue , currencyCode , currencySymbol ) }
112- </ div >
112+ showPrefix && (
113+ < div >
114+ { getCurrencySymbol ( localeValue , currencyCode , currencySymbol ) }
115+ </ div >
116+ )
113117 }
114118 { ...props }
115119 value = { formattedValue }
You can’t perform that action at this time.
0 commit comments