Class: ActionView::Storybook::Controls::ColorConfig

Inherits:
ControlConfig
  • Object
show all
Defined in:
lib/action_view/storybook/controls/color_config.rb

Instance Attribute Summary collapse

Attributes inherited from ControlConfig

#name, #param, #value

Instance Method Summary collapse

Methods inherited from ControlConfig

#to_csf_params, #value_from_param

Constructor Details

#initialize(param, value, name: nil, preset_colors: nil) ⇒ ColorConfig

Returns a new instance of ColorConfig.



9
10
11
12
# File 'lib/action_view/storybook/controls/color_config.rb', line 9

def initialize(param, value, name: nil, preset_colors: nil)
  super(param, value, name: name)
  @preset_colors = preset_colors
end

Instance Attribute Details

#preset_colorsObject (readonly)

Returns the value of attribute preset_colors.



7
8
9
# File 'lib/action_view/storybook/controls/color_config.rb', line 7

def preset_colors
  @preset_colors
end

Instance Method Details

#typeObject



14
15
16
# File 'lib/action_view/storybook/controls/color_config.rb', line 14

def type
  :color
end