Skip to content

Commit 29ea769

Browse files
authored
Merge pull request #58 from sunnylqm/patch-1
Create index.d.ts
2 parents 34f52bb + 6ba42d7 commit 29ea769

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

lib/index.d.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
declare module 'react-native-switch-pro' {
2+
import { Component } from 'react';
3+
import { StyleProp, ViewStyle } from 'react-native';
4+
export interface SwitchProps {
5+
width?: number;
6+
height?: number;
7+
value?: boolean;
8+
disabled?: boolean;
9+
circleColorActive?: string;
10+
circleColorInactive?: string;
11+
backgroundActive?: string;
12+
backgroundInactive?: string;
13+
onAsyncPress?: (cb: (result: boolean) => void) => void;
14+
onSyncPress?: (value: boolean) => void;
15+
style?: StyleProp<ViewStyle>;
16+
circleStyle?: StyleProp<ViewStyle>;
17+
}
18+
19+
export default class Switch extends Component<SwitchProps> {}
20+
}

0 commit comments

Comments
 (0)