class LucidComponent::StylesWrapper

Public Instance Methods

[](prop) click to toggle source
# File lib/isomorfeus_preact/lucid_component/styles_wrapper.rb, line 17
def [](prop)
  method_missing(prop)
end
fade_in() click to toggle source
# File lib/isomorfeus_preact/lucid_component/styles_wrapper.rb, line 9
def fade_in
  'fadeIn'
end
fade_out() click to toggle source
# File lib/isomorfeus_preact/lucid_component/styles_wrapper.rb, line 13
def fade_out
  'fadeOut'
end
is_wrapped_style() click to toggle source
# File lib/isomorfeus_preact/lucid_component/styles_wrapper.rb, line 5
def is_wrapped_style
  true
end
method_missing(prop, *args, &block) click to toggle source
# File lib/isomorfeus_preact/lucid_component/styles_wrapper.rb, line 21
def method_missing(prop, *args, &block)
  %x{
    let value;
    value = #@native[prop];
    if (value) { return value; }
    else {
      console.warn("Style/Theme key '" + prop + "' returning nil!");
      return #{nil};
    }
  }
end
to_h() click to toggle source
# File lib/isomorfeus_preact/lucid_component/styles_wrapper.rb, line 33
def to_h
  %x{
    if (#@props_prop) { return Opal.Hash.$new(#@native.props[#@props_prop]); }
    else { return Opal.Hash.$new(#@native); }
  }
end