PesepayTheme
How elements look. Set it in loadPesepay(), in elements() or on one element: each layer overrides the one before.
export interface PesepayThemeProperties
Section titled “Properties”| Name | Type | Description |
|---|---|---|
colors? | { primary?: string; primaryText?: string; border?: string; borderFocus?: string; background?: string; text?: string; error?: string; success?: string; placeholder?: string; } | Colours, as CSS colour values. |
fonts? | { family?: string; size?: string; weight?: string; } | Font family, size and weight, as CSS values. Load a web font for the card fields with ElementsOptions.fonts. |
labels? | ThemeLabels | Where field labels go. Defaults to "hidden" for the card fields and "above" for the mobile element. |
preset? | ThemePreset | Starts from a preset. Every other token you set, in any theme layer, overrides the preset’s value. |
spacing? | { padding?: string; borderRadius?: string; borderWidth?: string; gap?: string; } | Padding, corner radius and border width, as CSS lengths. |
states? | { disabled?: { opacity?: number; cursor?: string; }; focus?: { boxShadow?: string; borderColor?: string; }; invalid?: { borderColor?: string; color?: string; }; } | Overrides for the disabled, focused and invalid states. |