@popp0102/nova 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ const DIRECTIONS = {
8
8
 
9
9
  const VALID_DIRECTIONS = Object.values(DIRECTIONS);
10
10
 
11
- export default function FadeView({ children, direction = DIRECTIONS.IN, duration = 1000 }) {
11
+ export default function FadeView({ children, direction = DIRECTIONS.IN, duration = 1000, style }) {
12
12
  if (!VALID_DIRECTIONS.includes(direction)) {
13
13
  throw new Error(`FadeView: direction must be one of ${VALID_DIRECTIONS.join(', ')}. Got: ${direction}`);
14
14
  }
@@ -26,7 +26,7 @@ export default function FadeView({ children, direction = DIRECTIONS.IN, duration
26
26
  }, []);
27
27
 
28
28
  return (
29
- <Animated.View style={{ opacity: fadeAnimationValue }}>
29
+ <Animated.View style={[style, { opacity: fadeAnimationValue }]}>
30
30
  {children}
31
31
  </Animated.View>
32
32
  );
@@ -10,7 +10,7 @@ const DIRECTIONS = {
10
10
 
11
11
  const VALID_DIRECTIONS = Object.values(DIRECTIONS);
12
12
 
13
- export default function SlideView({ children, direction = DIRECTIONS.LEFT, duration = 1000 }) {
13
+ export default function SlideView({ children, direction = DIRECTIONS.LEFT, duration = 1000, style }) {
14
14
  if (!VALID_DIRECTIONS.includes(direction)) {
15
15
  throw new Error(`SlideView: direction must be one of ${VALID_DIRECTIONS.join(', ')}. Got: ${direction}`);
16
16
  }
@@ -51,7 +51,7 @@ export default function SlideView({ children, direction = DIRECTIONS.LEFT, durat
51
51
  }, []);
52
52
 
53
53
  return (
54
- <Animated.View style={{ transform: [{ [transformProperty]: slideAnimationValue }] }}>
54
+ <Animated.View style={[style, { transform: [{ [transformProperty]: slideAnimationValue }] }]}>
55
55
  {children}
56
56
  </Animated.View>
57
57
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popp0102/nova",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "React Native component library",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.js",