pub struct ThemeConfig {
pub dark: Option<Box<ThemeModeConfig>>,
pub font_primary_url: Option<String>,
pub font_secondary_url: Option<String>,
pub font_size: Option<FontSize>,
pub font_weight: Option<FontWeight>,
pub light: Option<Box<ThemeModeConfig>>,
pub pay_button_text: Option<String>,
pub radius: Option<String>,
}Expand description
ThemeConfig : Custom theme configuration with colors for light and dark modes.
Fields§
§dark: Option<Box<ThemeModeConfig>>Dark mode color configuration
font_primary_url: Option<String>URL for the primary font. Must be a valid https:// URL.
font_secondary_url: Option<String>URL for the secondary font. Must be a valid https:// URL.
font_size: Option<FontSize>Font size for the checkout UI
font_weight: Option<FontWeight>Font weight for the checkout UI
light: Option<Box<ThemeModeConfig>>Light mode color configuration
Custom text for the pay button (e.g., "Complete Purchase", "Subscribe Now"). Max 100 characters.
radius: Option<String>Border radius for UI elements. Must be a number followed by px, rem, or em (e.g., "4px", "0.5rem", "1em")
Implementations§
Source§impl ThemeConfig
impl ThemeConfig
Sourcepub fn new() -> ThemeConfig
pub fn new() -> ThemeConfig
Custom theme configuration with colors for light and dark modes.
Trait Implementations§
Source§impl Clone for ThemeConfig
impl Clone for ThemeConfig
Source§fn clone(&self) -> ThemeConfig
fn clone(&self) -> ThemeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ThemeConfig
impl Debug for ThemeConfig
Source§impl Default for ThemeConfig
impl Default for ThemeConfig
Source§fn default() -> ThemeConfig
fn default() -> ThemeConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ThemeConfig
impl<'de> Deserialize<'de> for ThemeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ThemeConfig
impl PartialEq for ThemeConfig
Source§impl Serialize for ThemeConfig
impl Serialize for ThemeConfig
impl StructuralPartialEq for ThemeConfig
Auto Trait Implementations§
impl Freeze for ThemeConfig
impl RefUnwindSafe for ThemeConfig
impl Send for ThemeConfig
impl Sync for ThemeConfig
impl Unpin for ThemeConfig
impl UnsafeUnpin for ThemeConfig
impl UnwindSafe for ThemeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more