UNPKG

1.49 kBTypeScriptView Raw
1import * as React from 'react';
2declare type Props = {
3 /**
4 * Status of checkbox.
5 */
6 status: 'checked' | 'unchecked' | 'indeterminate';
7 /**
8 * Whether checkbox is disabled.
9 */
10 disabled?: boolean;
11 /**
12 * Function to execute on press.
13 */
14 onPress?: () => void;
15 /**
16 * Custom color for unchecked checkbox.
17 */
18 uncheckedColor?: string;
19 /**
20 * Custom color for checkbox.
21 */
22 color?: string;
23 /**
24 * @optional
25 */
26 theme: ReactNativePaper.Theme;
27 /**
28 * testID to be used on tests.
29 */
30 testID?: string;
31};
32declare const _default: React.ComponentType<Pick<Props, "color" | "onPress" | "testID" | "disabled" | "status" | "uncheckedColor"> & {
33 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
34}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<Props> & ((props: Props) => JSX.Element), {}>;
35export default _default;
36declare const CheckboxWithTheme: React.ComponentType<Pick<Props, "color" | "onPress" | "testID" | "disabled" | "status" | "uncheckedColor"> & {
37 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
38}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<Props> & ((props: Props) => JSX.Element), {}>;
39export { CheckboxWithTheme as Checkbox };
40
\No newline at end of file