Class: Dodopayments::Models::ThemeModeConfig

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/theme_mode_config.rb,
sig/dodopayments/models/theme_mode_config.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(bg_primary: nil, bg_secondary: nil, border_primary: nil, border_secondary: nil, button_primary: nil, button_primary_hover: nil, button_secondary: nil, button_secondary_hover: nil, button_text_primary: nil, button_text_secondary: nil, input_focus_border: nil, text_error: nil, text_placeholder: nil, text_primary: nil, text_secondary: nil, text_success: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::ThemeModeConfig for more details.

Color configuration for a single theme mode (light or dark).

All color fields accept standard CSS color formats:

  • Hex: #fff, #ffffff, #ffffffff (with or without # prefix)
  • RGB/RGBA: rgb(255, 255, 255), rgba(255, 255, 255, 0.5)
  • HSL/HSLA: hsl(120, 100%, 50%), hsla(120, 100%, 50%, 0.5)
  • Named colors: red, blue, transparent, etc.
  • Advanced: hwb(), lab(), lch(), oklab(), oklch(), color()

Parameters:

  • bg_primary (String, nil) (defaults to: nil)

    Background primary color

  • bg_secondary (String, nil) (defaults to: nil)

    Background secondary color

  • border_primary (String, nil) (defaults to: nil)

    Border primary color

  • border_secondary (String, nil) (defaults to: nil)

    Border secondary color

  • button_primary (String, nil) (defaults to: nil)

    Primary button background color

  • button_primary_hover (String, nil) (defaults to: nil)

    Primary button hover color

  • button_secondary (String, nil) (defaults to: nil)

    Secondary button background color

  • button_secondary_hover (String, nil) (defaults to: nil)

    Secondary button hover color

  • button_text_primary (String, nil) (defaults to: nil)

    Primary button text color

  • button_text_secondary (String, nil) (defaults to: nil)

    Secondary button text color

  • input_focus_border (String, nil) (defaults to: nil)

    Input focus border color

  • text_error (String, nil) (defaults to: nil)

    Text error color

  • text_placeholder (String, nil) (defaults to: nil)

    Text placeholder color

  • text_primary (String, nil) (defaults to: nil)

    Text primary color

  • text_secondary (String, nil) (defaults to: nil)

    Text secondary color

  • text_success (String, nil) (defaults to: nil)

    Text success color



# File 'lib/dodopayments/models/theme_mode_config.rb', line 104

Instance Attribute Details

#bg_primaryString?

Background primary color

Examples: "#ffffff", "rgb(255, 255, 255)", "white"

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


12
# File 'lib/dodopayments/models/theme_mode_config.rb', line 12

optional :bg_primary, String, nil?: true

#bg_secondaryString?

Background secondary color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


18
# File 'lib/dodopayments/models/theme_mode_config.rb', line 18

optional :bg_secondary, String, nil?: true

#border_primaryString?

Border primary color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


24
# File 'lib/dodopayments/models/theme_mode_config.rb', line 24

optional :border_primary, String, nil?: true

#border_secondaryString?

Border secondary color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


30
# File 'lib/dodopayments/models/theme_mode_config.rb', line 30

optional :border_secondary, String, nil?: true

#button_primaryString?

Primary button background color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


36
# File 'lib/dodopayments/models/theme_mode_config.rb', line 36

optional :button_primary, String, nil?: true

#button_primary_hoverString?

Primary button hover color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


42
# File 'lib/dodopayments/models/theme_mode_config.rb', line 42

optional :button_primary_hover, String, nil?: true

#button_secondaryString?

Secondary button background color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


48
# File 'lib/dodopayments/models/theme_mode_config.rb', line 48

optional :button_secondary, String, nil?: true

#button_secondary_hoverString?

Secondary button hover color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


54
# File 'lib/dodopayments/models/theme_mode_config.rb', line 54

optional :button_secondary_hover, String, nil?: true

#button_text_primaryString?

Primary button text color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


60
# File 'lib/dodopayments/models/theme_mode_config.rb', line 60

optional :button_text_primary, String, nil?: true

#button_text_secondaryString?

Secondary button text color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


66
# File 'lib/dodopayments/models/theme_mode_config.rb', line 66

optional :button_text_secondary, String, nil?: true

#input_focus_borderString?

Input focus border color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


72
# File 'lib/dodopayments/models/theme_mode_config.rb', line 72

optional :input_focus_border, String, nil?: true

#text_errorString?

Text error color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


78
# File 'lib/dodopayments/models/theme_mode_config.rb', line 78

optional :text_error, String, nil?: true

#text_placeholderString?

Text placeholder color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


84
# File 'lib/dodopayments/models/theme_mode_config.rb', line 84

optional :text_placeholder, String, nil?: true

#text_primaryString?

Text primary color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


90
# File 'lib/dodopayments/models/theme_mode_config.rb', line 90

optional :text_primary, String, nil?: true

#text_secondaryString?

Text secondary color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


96
# File 'lib/dodopayments/models/theme_mode_config.rb', line 96

optional :text_secondary, String, nil?: true

#text_successString?

Text success color

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


102
# File 'lib/dodopayments/models/theme_mode_config.rb', line 102

optional :text_success, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


75
# File 'sig/dodopayments/models/theme_mode_config.rbs', line 75

def to_hash: -> {