Class: ViewComponent::Storybook::Controls::Date

Inherits:
SimpleControl show all
Defined in:
lib/view_component/storybook/controls/date.rb

Instance Attribute Summary

Attributes inherited from Control

#default, #description, #name, #param

Instance Method Summary collapse

Methods inherited from SimpleControl

#initialize, #to_csf_params

Methods inherited from Control

#initialize, #to_csf_params

Constructor Details

This class inherits a constructor from ViewComponent::Storybook::Controls::SimpleControl

Instance Method Details

#parse_param_value(value) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/view_component/storybook/controls/date.rb', line 11

def parse_param_value(value)
  if value.is_a?(String)
    DateTime.iso8601(value)
  else
    value
  end
end

#typeObject



7
8
9
# File 'lib/view_component/storybook/controls/date.rb', line 7

def type
  :date
end