Skip to content

Commit

Permalink
Merge pull request #78 from revolut-engineering/extend-cashback-curre…
Browse files Browse the repository at this point in the history
…ncies

Allow more currencies in Revolut Pay button cashback message
  • Loading branch information
atsikov authored Jan 12, 2024
2 parents 81e2f4c + 54b241e commit 5ed550e
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,40 @@ export type FieldStatus = Omit<StatusRecord<boolean>, 'default'>
export type FieldStyles = Partial<StatusRecord<Partial<CSSStyleDeclaration>>>
export type FieldClasses = Partial<StatusRecord<string>>

type RevolutPayButtonCashbackCurrency =
| 'AED'
| 'AUD'
| 'BGN'
| 'CAD'
| 'CHF'
| 'CZK'
| 'DKK'
| 'EUR'
| 'GBP'
| 'HKD'
| 'HUF'
| 'ILS'
| 'JPY'
| 'MXN'
| 'NOK'
| 'NZD'
| 'PLN'
| 'QAR'
| 'RON'
| 'RUB'
| 'SAR'
| 'SEK'
| 'SGD'
| 'THB'
| 'TRY'
| 'USD'
| 'ZAR'

type RevolutPayButtonStyleOptions = {
cashback: boolean
cashbackAmount: 1000 | 2000
cashbackCurrency: 'USD' | 'GBP' | 'EUR'
/** @deprecated */
cashbackAmount?: 1000 | 2000
cashbackCurrency: RevolutPayButtonCashbackCurrency
}

export type ButtonStyleOptions = {
Expand Down

0 comments on commit 5ed550e

Please sign in to comment.