Skip to content

Commit

Permalink
Merge branch 'main' into enhancement/cdn_route
Browse files Browse the repository at this point in the history
  • Loading branch information
vsrivatsa-edinburgh authored Apr 12, 2024
2 parents bffd9df + aebbec9 commit dbb41ee
Show file tree
Hide file tree
Showing 30 changed files with 1,511 additions and 1,507 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [0.39.1](https://github.com/juspay/hyperswitch-web/compare/v0.39.0...v0.39.1) (2024-04-10)


### Bug Fixes

* added support for Customization for PaymentMethodHeaderText ([#283](https://github.com/juspay/hyperswitch-web/issues/283)) ([bdbd84a](https://github.com/juspay/hyperswitch-web/commit/bdbd84acc2477938640e4fb1628d66345da5e333))

# [0.39.0](https://github.com/juspay/hyperswitch-web/compare/v0.38.2...v0.39.0) (2024-04-08)


Expand Down
36 changes: 30 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orca-payment-page",
"version": "0.39.0",
"version": "0.39.1",
"main": "index.js",
"private": true,
"dependencies": {
Expand Down
7 changes: 7 additions & 0 deletions src/BrutalTheme.res
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let brutal = {
fontWeightMedium: "700",
fontWeightBold: "800",
fontLineHeight: "",
fontSize2Xl: "24px",
fontSizeXl: "16px",
fontSizeLg: "14px",
fontSizeSm: "12px",
Expand Down Expand Up @@ -173,6 +174,12 @@ let brutalRules = (theme: CardThemeType.themeClass) =>
"borderTopColor": "transparent !important",
"borderLeftColor": "transparent !important",
},
".PaymentMethodsHeaderLabel": {
"color": theme.colorText,
"fontSize": theme.fontSize2Xl,
"fontWeight": theme.fontWeightMedium,
"marginBottom": "1.5rem",
},
}->Identity.anyTypeToJson

let default = brutal
Expand Down
27 changes: 21 additions & 6 deletions src/CardTheme.res
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,33 @@ let defaultConfig = {
type recoilConfig = {
config: configClass,
themeObj: themeClass,
localeString: LocaleString.localeStrings,
localeString: LocaleStringTypes.localeStrings,
showLoader: bool,
}
let getLocaleObject = string => {
let val = if string == "auto" {
let locale = if string == "auto" {
navigator["language"]
} else {
string
}
LocaleString.localeStrings
->Array.filter(item => item.locale == val)
->Array.get(0)
->Option.getOr(LocaleString.defaultLocale)
switch locale->LocaleStringHelper.mapLocalStringToTypeLocale {
| EN => EnglishLocale.localeStrings
| HE => HebrewLocale.localeStrings
| FR => FrenchLocale.localeStrings
| EN_GB => EnglishGBLocale.localeStrings
| AR => ArabicLocale.localeStrings
| JA => JapaneseLocale.localeStrings
| DE => DeutschLocale.localeStrings
| FR_BE => FrenchBelgiumLocale.localeStrings
| ES => SpanishLocale.localeStrings
| CA => CatalanLocale.localeStrings
| PT => PortugueseLocale.localeStrings
| IT => ItalianLocale.localeStrings
| PL => PolishLocale.localeStrings
| NL => DutchLocale.localeStrings
| SV => SwedishLocale.localeStrings
| RU => RussianLocale.localeStrings
}
}
let defaultRecoilConfig: recoilConfig = {
config: defaultConfig,
Expand Down Expand Up @@ -175,6 +189,7 @@ let getVariables = (str, dict, default, logger) => {
),
fontWeightBold: getWarningString(json, "fontWeightBold", default.fontWeightBold, ~logger),
fontLineHeight: getWarningString(json, "fontLineHeight", default.fontLineHeight, ~logger),
fontSize2Xl: getWarningString(json, "fontSize2Xl", default.fontSize2Xl, ~logger),
fontSizeXl: getWarningString(json, "fontSizeXl", default.fontSizeXl, ~logger),
fontSizeLg: getWarningString(json, "fontSizeLg", default.fontSizeLg, ~logger),
fontSizeSm: getWarningString(json, "fontSizeSm", default.fontSizeSm, ~logger),
Expand Down
7 changes: 7 additions & 0 deletions src/CharcoalTheme.res
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let charcoal = {
fontWeightMedium: "600",
fontWeightBold: "700",
fontLineHeight: "",
fontSize2Xl: "24px",
fontSizeXl: "16px",
fontSizeLg: "14px",
fontSizeSm: "12px",
Expand Down Expand Up @@ -173,6 +174,12 @@ let charcoalRules = theme =>
"fontWeight": theme.fontWeightLight,
"fontSize": theme.fontSizeLg,
},
".PaymentMethodsHeaderLabel": {
"color": theme.colorText,
"fontSize": theme.fontSize2Xl,
"fontWeight": theme.fontWeightMedium,
"marginBottom": "1.5rem",
},
}->Identity.anyTypeToJson

let default = charcoal
Expand Down
7 changes: 7 additions & 0 deletions src/DefaultTheme.res
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let default = {
fontWeightMedium: "600",
fontWeightBold: "700",
fontLineHeight: "",
fontSize2Xl: "24px",
fontSizeXl: "16px",
fontSizeLg: "14px",
fontSizeSm: "12px",
Expand Down Expand Up @@ -185,6 +186,12 @@ let defaultRules = theme =>
"fontWeight": theme.fontWeightLight,
"fontSize": theme.fontSizeLg,
},
".PaymentMethodsHeaderLabel": {
"color": theme.colorText,
"fontSize": theme.fontSize2Xl,
"fontWeight": theme.fontWeightMedium,
"marginBottom": "1.5rem",
},
}->Identity.anyTypeToJson

let default = default
Expand Down
Loading

0 comments on commit dbb41ee

Please sign in to comment.