@dropi/react-native-design-system 0.2.2 → 0.2.4
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TouchableOpacityProps } from 'react-native';
|
|
2
2
|
import { IconName } from 'dropi-lib-icons';
|
|
3
|
-
type Variant = 'primary' | 'secondary' | 'tertiary';
|
|
3
|
+
export type Variant = 'primary' | 'secondary' | 'tertiary';
|
|
4
4
|
type Size = 'small' | 'normal' | 'large';
|
|
5
5
|
interface Props extends TouchableOpacityProps {
|
|
6
6
|
label: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { Variant } from '../../atoms/Buttons/DefaultButton';
|
|
1
2
|
interface Props {
|
|
2
3
|
imageSource?: string | number;
|
|
3
4
|
title?: string;
|
|
4
5
|
message: string;
|
|
5
6
|
buttonLabel?: string;
|
|
6
7
|
onButtonPress?: () => void;
|
|
8
|
+
buttonType?: Variant;
|
|
7
9
|
}
|
|
8
|
-
export declare const EmptyState: ({ imageSource, title, message, buttonLabel, onButtonPress }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const EmptyState: ({ imageSource, title, message, buttonLabel, onButtonPress, buttonType }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export {};
|
|
@@ -15,7 +15,8 @@ const EmptyState = ({
|
|
|
15
15
|
title,
|
|
16
16
|
message,
|
|
17
17
|
buttonLabel,
|
|
18
|
-
onButtonPress
|
|
18
|
+
onButtonPress,
|
|
19
|
+
buttonType = 'tertiary'
|
|
19
20
|
}) => {
|
|
20
21
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
21
22
|
style: styles.container,
|
|
@@ -36,7 +37,7 @@ const EmptyState = ({
|
|
|
36
37
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.DefaultButton, {
|
|
37
38
|
label: buttonLabel,
|
|
38
39
|
onPress: onButtonPress,
|
|
39
|
-
variant:
|
|
40
|
+
variant: buttonType,
|
|
40
41
|
size: 'normal'
|
|
41
42
|
})
|
|
42
43
|
})]
|
|
@@ -3,5 +3,5 @@ interface Props {
|
|
|
3
3
|
setFilterText: (text: string) => void;
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const Search: ({ filterText, setFilterText, placeholder }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const Search: ({ filterText, setFilterText, placeholder, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -12,7 +12,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
12
12
|
const Search = ({
|
|
13
13
|
filterText,
|
|
14
14
|
setFilterText,
|
|
15
|
-
placeholder
|
|
15
|
+
placeholder,
|
|
16
|
+
...rest
|
|
16
17
|
}) => {
|
|
17
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
18
19
|
style: {
|
|
@@ -44,7 +45,8 @@ const Search = ({
|
|
|
44
45
|
placeholder: placeholder || 'Buscar',
|
|
45
46
|
placeholderTextColor: _constants.colors['Gray-500'].light,
|
|
46
47
|
value: filterText,
|
|
47
|
-
onChangeText: setFilterText
|
|
48
|
+
onChangeText: setFilterText,
|
|
49
|
+
...rest
|
|
48
50
|
}), filterText !== '' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.TextButton, {
|
|
49
51
|
label: "",
|
|
50
52
|
size: "large",
|