sapo-components-ui-rn 1.0.63 → 1.0.65

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.
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ export interface NumberKeyboardProps {
3
+ /** Giá trị hiện tại của input */
4
+ value?: string | number;
5
+ /** Label hiển thị trên modal */
6
+ label?: string;
7
+ /** Callback khi giá trị thay đổi */
8
+ onChangeText?: (value: string) => void;
9
+ /** Giá trị tối đa cho phép */
10
+ maxValue?: number;
11
+ /** Loại input: integer hoặc float */
12
+ type?: "integer" | "float";
13
+ /** Số chữ số thập phân cho phép */
14
+ formatDecimal?: 1 | 2 | 3;
15
+ /** Trạng thái hiển thị modal */
16
+ visible: boolean;
17
+ /** Callback khi đóng modal */
18
+ onClose: () => void;
19
+ }
20
+ declare const _default: React.NamedExoticComponent<NumberKeyboardProps>;
21
+ export default _default;
@@ -1,7 +1,5 @@
1
1
  import * as React from "react";
2
- import { StyleProp, Switch as NativeSwitch, ViewStyle } from "react-native";
3
- import type { ThemeProp } from "../../types";
4
- export type Props = React.ComponentPropsWithRef<typeof NativeSwitch> & {
2
+ export type Props = {
5
3
  /**
6
4
  * Disable toggling the switch.
7
5
  */
@@ -10,38 +8,10 @@ export type Props = React.ComponentPropsWithRef<typeof NativeSwitch> & {
10
8
  * Value of the switch, true means 'on', false means 'off'.
11
9
  */
12
10
  value?: boolean;
13
- /**
14
- * Custom color for switch.
15
- */
16
- color?: string;
17
11
  /**
18
12
  * Callback called with the new value when it changes.
19
13
  */
20
- onValueChange?: Function;
21
- style?: StyleProp<ViewStyle>;
22
- /**
23
- * @optional
24
- */
25
- theme?: ThemeProp;
14
+ onValueChange?: (value: boolean) => void;
26
15
  };
27
- /**
28
- * Switch is a visual toggle between two mutually exclusive states — on and off.
29
- *
30
- * ## Usage
31
- * ```js
32
- * import * as React from 'react';
33
- * import { Switch } from 'react-native-paper';
34
- *
35
- * const MyComponent = () => {
36
- * const [isSwitchOn, setIsSwitchOn] = React.useState(false);
37
- *
38
- * const onToggleSwitch = () => setIsSwitchOn(!isSwitchOn);
39
- *
40
- * return <Switch value={isSwitchOn} onValueChange={onToggleSwitch} />;
41
- * };
42
- *
43
- * export default MyComponent;
44
- * ```
45
- */
46
- declare const Switch: ({ value, disabled, onValueChange, color, theme: themeOverrides, ...rest }: Props) => React.JSX.Element;
16
+ declare const Switch: React.MemoExoticComponent<({ value, disabled, onValueChange }: Props) => React.JSX.Element>;
47
17
  export default Switch;
package/dist/index.d.ts CHANGED
@@ -26,6 +26,7 @@ export { default as Avatar } from "./components/Avatar";
26
26
  export { default as SelectionField } from "./components/SelectionField";
27
27
  export { default as SearchInput } from "./components/SearchInput";
28
28
  export { default as Tag } from "./components/Tag";
29
+ export { default as NumberKeyboard } from "./components/NumberKeyboard";
29
30
  export type { Props as ActivityIndicatorProps } from "./components/ActivityIndicator";
30
31
  export type { Props as SwitchProps } from "./components/Switch/Switch";
31
32
  export type { Props as TextInputProps } from "./components/TextInput/TextInput";