dhre-ui-kit 0.0.367 → 0.0.369
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/lib/index.d.ts +3 -0
- package/lib/index.js +16 -5
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +16 -5
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -55,6 +55,9 @@ interface BottomDrawerProps {
|
|
|
55
55
|
propagateSwipe?: boolean;
|
|
56
56
|
swipeDirection?: string;
|
|
57
57
|
footer?: React.ReactNode;
|
|
58
|
+
rightTitleVariant?: string;
|
|
59
|
+
rightTitle?: string;
|
|
60
|
+
rightTitleStyle?: TextStyle;
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
declare const BottomDrawer: React$1.FC<BottomDrawerProps>;
|
package/lib/index.js
CHANGED
|
@@ -694,7 +694,8 @@ const styles$z = reactNative.StyleSheet.create({
|
|
|
694
694
|
},
|
|
695
695
|
title: { flex: 1, color: "#fff", textAlign: "left" },
|
|
696
696
|
leftIconStyle: { marginRight: 8 },
|
|
697
|
-
rightIconStyle: { marginLeft: 8 }
|
|
697
|
+
rightIconStyle: { marginLeft: 8 },
|
|
698
|
+
rightTitle: { flex: 1, color: "#fff", textAlign: "right", marginRight: verticalScale(16) }
|
|
698
699
|
});
|
|
699
700
|
|
|
700
701
|
const isIos = () => reactNative.Platform.OS === "ios" /* ios */;
|
|
@@ -724,7 +725,10 @@ const BottomDrawer = ({
|
|
|
724
725
|
backdropOpacity = 0.9,
|
|
725
726
|
footer,
|
|
726
727
|
propagateSwipe = true,
|
|
727
|
-
swipeDirection = "down"
|
|
728
|
+
swipeDirection = "down",
|
|
729
|
+
rightTitleVariant = "B2_REGULAR",
|
|
730
|
+
rightTitle,
|
|
731
|
+
rightTitleStyle
|
|
728
732
|
}) => {
|
|
729
733
|
return /* @__PURE__ */ React__default["default"].createElement(
|
|
730
734
|
Modal__default["default"],
|
|
@@ -744,7 +748,7 @@ const BottomDrawer = ({
|
|
|
744
748
|
behavior: isIos() ? "padding" : "height",
|
|
745
749
|
style: { flex: 1 }
|
|
746
750
|
},
|
|
747
|
-
/* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$z.mainContainer, style], testID }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$z.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React__default["default"].createElement(reactNative.Pressable, { onPress: () => swipeDirection === "" && toggleModal() }, showSeparator && /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$z.separator }), /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$z.headerContainer }, showLeftIcon && leftIcon ? React__default["default"].cloneElement(leftIcon, {
|
|
751
|
+
/* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$z.mainContainer, style], testID }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$z.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React__default["default"].createElement(reactNative.Pressable, { onPress: () => swipeDirection === "" && toggleModal() }, showSeparator && /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$z.separator }), /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$z.headerContainer }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, null, showLeftIcon && leftIcon ? React__default["default"].cloneElement(leftIcon, {
|
|
748
752
|
width: moderateScale(24),
|
|
749
753
|
height: moderateScale(24),
|
|
750
754
|
style: styles$z.leftIconStyle,
|
|
@@ -756,12 +760,19 @@ const BottomDrawer = ({
|
|
|
756
760
|
text: title,
|
|
757
761
|
style: { ...styles$z.title, ...titleStyle }
|
|
758
762
|
}
|
|
759
|
-
),
|
|
763
|
+
)), /* @__PURE__ */ React__default["default"].createElement(reactNative.View, null, rightTitle ? /* @__PURE__ */ React__default["default"].createElement(
|
|
764
|
+
CustomTypography,
|
|
765
|
+
{
|
|
766
|
+
variant: rightTitleVariant,
|
|
767
|
+
text: rightTitle,
|
|
768
|
+
style: { ...styles$z.rightTitle, ...rightTitleStyle }
|
|
769
|
+
}
|
|
770
|
+
) : null, showRightIcon && rightIcon ? React__default["default"].cloneElement(rightIcon, {
|
|
760
771
|
width: moderateScale(24),
|
|
761
772
|
height: moderateScale(24),
|
|
762
773
|
style: styles$z.rightIconStyle,
|
|
763
774
|
onPress: toggleModal
|
|
764
|
-
}) : null)), children))
|
|
775
|
+
}) : null))), children))
|
|
765
776
|
),
|
|
766
777
|
footer ? /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, footer) : null
|
|
767
778
|
);
|