@rn-components-dropdown/dropdown 1.0.6 → 1.0.7
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.
- package/dist/assets/svg/ArrowDown.js +1 -1
- package/dist/assets/svg/ArrowUp.js +1 -1
- package/dist/assets/svg/SearchIcon.js +1 -1
- package/dist/components/dropdown/Dropdown.js +1 -1
- package/package.json +1 -1
- package/src/assets/svg/ArrowDown.tsx +1 -1
- package/src/assets/svg/ArrowUp.tsx +1 -1
- package/src/assets/svg/SearchIcon.tsx +1 -1
- package/src/components/dropdown/Dropdown.tsx +1 -1
|
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
const react_1 = __importDefault(require("react"));
|
|
40
40
|
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
41
|
-
const ArrowDown = ({ size =
|
|
41
|
+
const ArrowDown = ({ size = 16, color = "black" }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
42
42
|
<react_native_svg_1.Mask id="mask0_2371_2505" maskUnits="userSpaceOnUse" x={0} y={0} width={24} height={24}>
|
|
43
43
|
<react_native_svg_1.Rect width={24} height={24} rx={1} fill="#fff"/>
|
|
44
44
|
</react_native_svg_1.Mask>
|
|
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
const react_1 = __importDefault(require("react"));
|
|
40
40
|
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
41
|
-
const ArrowUp = ({ size =
|
|
41
|
+
const ArrowUp = ({ size = 16, color = "#1C1B1F" }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
42
42
|
<react_native_svg_1.Mask id="mask0_2375_2500" maskUnits="userSpaceOnUse" x={0} y={0} width={24} height={24}>
|
|
43
43
|
<react_native_svg_1.Rect x={24} y={24} width={24} height={24} rx={1} transform="rotate(-180 24 24)" fill={color}/>
|
|
44
44
|
</react_native_svg_1.Mask>
|
|
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
const react_1 = __importDefault(require("react"));
|
|
40
40
|
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
41
|
-
const SearchIcon = ({ size =
|
|
41
|
+
const SearchIcon = ({ size = 18, color = "#1C1B1F" }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 18 18" fill={color}>
|
|
42
42
|
<react_native_svg_1.Path d="M17.3 17.3C16.9134 17.6866 16.2866 17.6866 15.9 17.3L11.6989 13.0989C10.9025 12.3025 9.63504 12.2695 8.575 12.65C7.925 12.8833 7.23333 13 6.5 13C4.68333 13 3.14583 12.3708 1.8875 11.1125C0.629167 9.85417 0 8.31667 0 6.5C0 4.68333 0.629167 3.14583 1.8875 1.8875C3.14583 0.629167 4.68333 0 6.5 0C8.31667 0 9.85417 0.629167 11.1125 1.8875C12.3708 3.14583 13 4.68333 13 6.5C13 7.23333 12.8833 7.925 12.65 8.575C12.2695 9.63504 12.3025 10.9025 13.0989 11.6989L17.3 15.9C17.6866 16.2866 17.6866 16.9134 17.3 17.3ZM6.5 11C7.75 11 8.8125 10.5625 9.6875 9.6875C10.5625 8.8125 11 7.75 11 6.5C11 5.25 10.5625 4.1875 9.6875 3.3125C8.8125 2.4375 7.75 2 6.5 2C5.25 2 4.1875 2.4375 3.3125 3.3125C2.4375 4.1875 2 5.25 2 6.5C2 7.75 2.4375 8.8125 3.3125 9.6875C4.1875 10.5625 5.25 11 6.5 11Z"/>
|
|
43
43
|
</react_native_svg_1.default>);
|
|
44
44
|
exports.default = SearchIcon;
|
|
@@ -53,7 +53,7 @@ const DropdownComponent = (props) => {
|
|
|
53
53
|
const { styles, colors } = (0, DropdownStyle_1.useDropdownStyle)({});
|
|
54
54
|
const { ref, font, visible, refList, position, onSelect, listData, onSearch, onMeasure, searchText, showOrClose, scrollIndex, currentValue, onCheckPress, onClearPress, setSearchText, keyboardHeight, } = (0, useDropdown_1.default)({ ...props });
|
|
55
55
|
const renderRight = () => {
|
|
56
|
-
return renderRightIcon ? (renderRightIcon(visible)) : (<SvgButton_1.default icon={subfixIcon ? subfixIcon : visible ? <svg_1.
|
|
56
|
+
return renderRightIcon ? (renderRightIcon(visible)) : (<SvgButton_1.default icon={subfixIcon ? subfixIcon : visible ? <svg_1.ArrowUp color={iconColor}/> : <svg_1.ArrowDown color={iconColor}/>} onPress={showOrClose} style={react_native_1.StyleSheet.flatten([
|
|
57
57
|
iconStyle,
|
|
58
58
|
styles.icon,
|
|
59
59
|
{ tintColor: iconColor },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Svg, { Path, Mask, Rect, G } from "react-native-svg";
|
|
3
3
|
|
|
4
|
-
const ArrowDown = ({ size =
|
|
4
|
+
const ArrowDown = ({ size = 16, color = "black" }) => (
|
|
5
5
|
<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
6
6
|
<Mask
|
|
7
7
|
id="mask0_2371_2505"
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import Svg, { Mask, Rect, G, Path } from "react-native-svg";
|
|
3
3
|
import { SvgInterface } from "../../interface/svg.interface";
|
|
4
4
|
|
|
5
|
-
const ArrowUp = ({ size =
|
|
5
|
+
const ArrowUp = ({ size = 16, color = "#1C1B1F" }: SvgInterface) => (
|
|
6
6
|
<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
7
7
|
<Mask
|
|
8
8
|
id="mask0_2375_2500"
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import Svg, { Path, SvgProps } from "react-native-svg";
|
|
3
3
|
import { SvgInterface } from "../../interface/svg.interface";
|
|
4
4
|
|
|
5
|
-
const SearchIcon = ({
|
|
5
|
+
const SearchIcon = ({ size= 18, color = "#1C1B1F" }: SvgInterface) => (
|
|
6
6
|
<Svg width={size} height={size} viewBox="0 0 18 18" fill={color}>
|
|
7
7
|
<Path d="M17.3 17.3C16.9134 17.6866 16.2866 17.6866 15.9 17.3L11.6989 13.0989C10.9025 12.3025 9.63504 12.2695 8.575 12.65C7.925 12.8833 7.23333 13 6.5 13C4.68333 13 3.14583 12.3708 1.8875 11.1125C0.629167 9.85417 0 8.31667 0 6.5C0 4.68333 0.629167 3.14583 1.8875 1.8875C3.14583 0.629167 4.68333 0 6.5 0C8.31667 0 9.85417 0.629167 11.1125 1.8875C12.3708 3.14583 13 4.68333 13 6.5C13 7.23333 12.8833 7.925 12.65 8.575C12.2695 9.63504 12.3025 10.9025 13.0989 11.6989L17.3 15.9C17.6866 16.2866 17.6866 16.9134 17.3 17.3ZM6.5 11C7.75 11 8.8125 10.5625 9.6875 9.6875C10.5625 8.8125 11 7.75 11 6.5C11 5.25 10.5625 4.1875 9.6875 3.3125C8.8125 2.4375 7.75 2 6.5 2C5.25 2 4.1875 2.4375 3.3125 3.3125C2.4375 4.1875 2 5.25 2 6.5C2 7.75 2.4375 8.8125 3.3125 9.6875C4.1875 10.5625 5.25 11 6.5 11Z"/>
|
|
8
8
|
</Svg>
|
|
@@ -92,7 +92,7 @@ const DropdownComponent = <T, Mode extends 'single' | 'multi'>(
|
|
|
92
92
|
renderRightIcon(visible)
|
|
93
93
|
) : (
|
|
94
94
|
<SvgButton
|
|
95
|
-
icon={subfixIcon ? subfixIcon : visible ?
|
|
95
|
+
icon={subfixIcon ? subfixIcon : visible ? <ArrowUp color={iconColor} /> : <ArrowDown color={iconColor} />}
|
|
96
96
|
onPress={showOrClose}
|
|
97
97
|
style={StyleSheet.flatten([
|
|
98
98
|
iconStyle,
|