constelation / monorepo

Mono repo for constelation's Components, functions, and CONSTANTS
https://constelation.github.io/monorepo/
MIT License
12 stars 3 forks source link

<Style_> does not pass props correctly to <Animated.View> #14

Closed thomasbruketta closed 7 years ago

thomasbruketta commented 7 years ago

This is a fairly major blocker to using the component in RN. It throws a prop error when attempting to pass props to and seems to conflict with the Animated styles. It may be due to the way in which Animated wraps the component.

mikehobi commented 7 years ago

Could you post the specific prop error? Is it only when animated values are included in <Style_>? or any style?

mikehobi commented 7 years ago

Also does this work?


<Style_
    style={{
        backgroundColor: 'blue',
    }}
>
    <Animated.View />
</Style_>
mikehobi commented 7 years ago

Closing issue. working ex:

import View from 'constelation-View'
const AnimatedView = Animated.createAnimatedComponent(View)
<Style_
  backgroundColor={this.myAnimatedColor}
  transform={[
    {translateY: this.myAnimatedTranslate},
  ]}
 >
  <AnimatedView
    width={100}
    height={this.myAnimatedValue}
/>
</Style_>