Class: ViewComponent::Storybook::Controls::ColorConfig
- Inherits:
-
SimpleControlConfig
- Object
- ControlConfig
- SimpleControlConfig
- ViewComponent::Storybook::Controls::ColorConfig
- Defined in:
- lib/view_component/storybook/controls/color_config.rb
Instance Attribute Summary collapse
-
#preset_colors ⇒ Object
readonly
Returns the value of attribute preset_colors.
Attributes inherited from SimpleControlConfig
Instance Method Summary collapse
-
#initialize(default_value, preset_colors: nil, param: nil, name: nil, description: nil) ⇒ ColorConfig
constructor
A new instance of ColorConfig.
- #type ⇒ Object
Methods inherited from SimpleControlConfig
#to_csf_params, #value_from_params
Methods inherited from ControlConfig
#description, #name, #param, #prefix_param, #to_csf_params, #value_from_params
Constructor Details
#initialize(default_value, preset_colors: nil, param: nil, name: nil, description: nil) ⇒ ColorConfig
Returns a new instance of ColorConfig.
9 10 11 12 |
# File 'lib/view_component/storybook/controls/color_config.rb', line 9 def initialize(default_value, preset_colors: nil, param: nil, name: nil, description: nil) super(default_value, param: param, name: name, description: description) @preset_colors = preset_colors end |
Instance Attribute Details
#preset_colors ⇒ Object (readonly)
Returns the value of attribute preset_colors.
7 8 9 |
# File 'lib/view_component/storybook/controls/color_config.rb', line 7 def preset_colors @preset_colors end |
Instance Method Details
#type ⇒ Object
14 15 16 |
# File 'lib/view_component/storybook/controls/color_config.rb', line 14 def type :color end |