@tfn-design/design-system 0.4.0 → 0.4.1
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.
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import type { ComponentPropsWithRef, ElementType,
|
|
2
|
-
import { Animated } from 'react-native';
|
|
1
|
+
import type { ComponentPropsWithRef, ElementType, FunctionComponent } from 'react';
|
|
2
|
+
import { Animated, Pressable } from 'react-native';
|
|
3
3
|
import type { StyledProps } from 'react-native-css';
|
|
4
4
|
declare const CLASS_NAME_TO_STYLE: {
|
|
5
5
|
readonly className: {
|
|
6
6
|
readonly target: "style";
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
type ClassNamed<C extends ElementType> = (props: StyledProps<ComponentPropsWithRef<C>, typeof CLASS_NAME_TO_STYLE>) =>
|
|
9
|
+
type ClassNamed<C extends ElementType> = (props: StyledProps<ComponentPropsWithRef<C>, typeof CLASS_NAME_TO_STYLE>) => ReturnType<FunctionComponent>;
|
|
10
10
|
export declare const AnimatedView: ClassNamed<typeof Animated.View>;
|
|
11
|
-
declare const
|
|
12
|
-
export declare const AnimatedPressable: ClassNamed<typeof AnimatedPressableBase>;
|
|
11
|
+
export declare const AnimatedPressable: ClassNamed<Animated.AnimatedComponent<typeof Pressable>>;
|
|
13
12
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Animated, Pressable } from 'react-native';
|
|
1
|
+
import { Animated, Pressable, View } from 'react-native';
|
|
2
2
|
import { styled } from 'nativewind';
|
|
3
3
|
const CLASS_NAME_TO_STYLE = { className: { target: 'style' } };
|
|
4
|
-
export const AnimatedView = styled(
|
|
5
|
-
const
|
|
6
|
-
export const AnimatedPressable = styled(AnimatedPressableBase, CLASS_NAME_TO_STYLE);
|
|
4
|
+
export const AnimatedView = Animated.createAnimatedComponent(styled(View, CLASS_NAME_TO_STYLE));
|
|
5
|
+
export const AnimatedPressable = Animated.createAnimatedComponent(styled(Pressable, CLASS_NAME_TO_STYLE));
|