Skip to content

Fix CKO config types #634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,48 +11,33 @@ import { setCustomerOrderParam } from "#utils/localStorage"

const scriptUrl = "https://checkout-web-components.checkout.com/index.js"

interface ElementAppearance {
fontFamily?: string
fontSize?: string
fontWeight?: number
letterSpacing?: number
lineHeight?: string
}

interface Appearance {
colorAction: string
colorBackground: string
colorBorder: string
colorDisabled: string
colorError: string
colorFormBackground: string
colorFormBorder: string
colorInverse: string
colorOutline: string
colorPrimary: string
colorSecondary: string
colorSuccess: string
button: {
fontFamily: string
fontSize: string
fontWeight: number
letterSpacing: number
lineHeight: string
}
footnote: {
fontFamily: string
fontSize: string
fontWeight: number
letterSpacing: number
lineHeight: string
}
label: {
fontFamily: string
fontSize: string
fontWeight: number
letterSpacing: number
lineHeight: string
}
subheading: {
fontFamily: string
fontSize: string
fontWeight: number
letterSpacing: number
lineHeight: string
}
borderRadius: [string, string]
colorAction?: string
colorBackground?: string
colorBorder?: string
colorDisabled?: string
colorError?: string
colorFormBackground?: string
colorFormBorder?: string
colorInverse?: string
colorOutline?: string
colorPrimary?: string
colorSecondary?: string
colorSuccess?: string
borderRadius?: [string, string]
button?: ElementAppearance
footnote?: ElementAppearance
label?: ElementAppearance
input?: ElementAppearance
subheading?: ElementAppearance
}

interface Component {
Expand Down Expand Up @@ -102,7 +87,7 @@ export interface CheckoutComConfig {
success_url: string
failure_url: string
options?: {
appearance: Partial<Appearance>
appearance: Appearance
}
[key: string]: unknown
}
Expand Down