From 8f7dfc7713668e8f80c41533e143378372a8d9c3 Mon Sep 17 00:00:00 2001 From: Jan Jakub Nanista Date: Tue, 17 Sep 2019 11:00:29 +0200 Subject: [PATCH] Add TypeScript definition file --- index.d.ts | 22 ++++++++++++++++++++++ package.json | 1 + 2 files changed, 23 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..65ff8cb --- /dev/null +++ b/index.d.ts @@ -0,0 +1,22 @@ +import React from 'react'; +import { StyleProp, TextStyle, ViewStyle } from 'react-native'; + +export interface CheckBoxProps { + style?: StyleProp; + leftText?: string; + leftTextStyle?: StyleProp; + leftTextView?: React.ReactNode; + rightText?: string; + rightTextStyle?: StyleProp; + rightTextView?: React.ReactNode; + checkedImage?: React.ReactElement; + uncheckedImage?: React.ReactElement; + isChecked: boolean; + onClick: () => void; + disabled?: boolean; + checkBoxColor?: string; + checkedCheckBoxColor?: string; + uncheckedCheckBoxColor?: string; +} + +export default class CheckBox extends React.Component {} \ No newline at end of file diff --git a/package.json b/package.json index e1406ec..da278fc 100755 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "2.1.7", "description": "Checkbox component for react native, it works on iOS and Android.", "main": "index.js", + "types": "index.d.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" },