Class: ViewComponent::Storybook::Controls::Options
- Inherits:
-
BaseOptions
- Object
- Control
- SimpleControl
- BaseOptions
- ViewComponent::Storybook::Controls::Options
- Defined in:
- lib/view_component/storybook/controls/options.rb
Constant Summary collapse
- TYPES =
%i[select radio inline-radio].freeze
Instance Attribute Summary
Attributes inherited from BaseOptions
Attributes inherited from Control
#default, #description, #name, #param
Instance Method Summary collapse
Methods inherited from BaseOptions
Methods inherited from SimpleControl
Methods inherited from Control
Constructor Details
This class inherits a constructor from ViewComponent::Storybook::Controls::BaseOptions
Instance Method Details
#parse_param_value(value) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/view_component/storybook/controls/options.rb', line 12 def parse_param_value(value) if value.is_a?(String) && symbol_value value.to_sym else value end end |
#to_csf_params ⇒ Object
20 21 22 |
# File 'lib/view_component/storybook/controls/options.rb', line 20 def to_csf_params super.deep_merge(argTypes: { param => { options: } }) end |