-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
39 lines (35 loc) · 1.15 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* typescript definition
* @author rio
*/
declare module "react-native-kanji-animation" {
import React from "react";
import { PathProps } from "react-native-svg";
import { Animated, StyleProp, ViewStyle } from "react-native";
import SVGPathProperties from "svg-path-properties/dist/types/svg-path-properties";
export interface KanjiProperties {
containerStyle?: StyleProp<ViewStyle>;
easing?: (value: number) => number;
element: string;
duration?: number;
guideProps?: PathProps;
size?: number;
step?: number;
placeholder?: boolean;
previousStep?: boolean;
pathProps?: PathProps;
placeholderProps?: PathProps;
onPress?: () => void;
onLongPress?: () => void;
}
export interface KanjiAnimationOptions {
step?: number;
previousStep?: boolean;
hideGuide?: boolean;
}
export class Kanji extends React.Component<KanjiProperties> {
animate(options?: KanjiAnimationOptions, callback?: Animated.EndCallback): void;
numOfStrokes(): number;
strokeProperties(): SVGPathProperties[];
}
}