Class: ViewComponent::Storybook::Controls::Color
- Inherits:
-
SimpleControl
- Object
- Control
- SimpleControl
- ViewComponent::Storybook::Controls::Color
- Defined in:
- lib/view_component/storybook/controls/color.rb
Instance Attribute Summary collapse
-
#preset_colors ⇒ Object
readonly
Returns the value of attribute preset_colors.
Attributes inherited from Control
#default, #description, #name, #param
Instance Method Summary collapse
-
#initialize(param, default: nil, preset_colors: nil, name: nil, description: nil, **opts) ⇒ Color
constructor
A new instance of Color.
- #type ⇒ Object
Methods inherited from SimpleControl
#parse_param_value, #to_csf_params
Methods inherited from Control
#parse_param_value, #to_csf_params
Constructor Details
#initialize(param, default: nil, preset_colors: nil, name: nil, description: nil, **opts) ⇒ Color
Returns a new instance of Color.
9 10 11 12 |
# File 'lib/view_component/storybook/controls/color.rb', line 9 def initialize(param, default: nil, preset_colors: nil, name: nil, description: nil, **opts) super(param, default: default, name: name, description: description, **opts) @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.rb', line 7 def preset_colors @preset_colors end |
Instance Method Details
#type ⇒ Object
14 15 16 |
# File 'lib/view_component/storybook/controls/color.rb', line 14 def type :color end |