@artsy/palette-mobile 13.2.11 → 13.2.12
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.
|
@@ -7,6 +7,7 @@ export interface BackButtonProps {
|
|
|
7
7
|
onPress?: () => void;
|
|
8
8
|
showX?: boolean;
|
|
9
9
|
style?: TouchableOpacityProps["style"];
|
|
10
|
+
iconSize?: number;
|
|
10
11
|
}
|
|
11
12
|
export declare const BackButton: React.FC<BackButtonProps>;
|
|
12
13
|
export declare const BackButtonWithBackground: React.FC<BackButtonProps>;
|
|
@@ -6,8 +6,8 @@ const react_native_1 = require("react-native");
|
|
|
6
6
|
const constants_1 = require("../../constants");
|
|
7
7
|
const svgs_1 = require("../../svgs");
|
|
8
8
|
const Flex_1 = require("../Flex");
|
|
9
|
-
const BackButton = ({ color = "onBackgroundHigh", hitSlop = constants_1.DEFAULT_HIT_SLOP, onPress, showX = false, style, }) => {
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { onPress: onPress, hitSlop: hitSlop, accessibilityRole: "button", accessibilityLabel: showX ? "Close" : "Go back", accessibilityHint: showX ? "Dismiss this screen" : "Go back to the previous screen", style: style, children: showX ? ((0, jsx_runtime_1.jsx)(svgs_1.CloseIcon, { fill: color, width:
|
|
9
|
+
const BackButton = ({ color = "onBackgroundHigh", hitSlop = constants_1.DEFAULT_HIT_SLOP, onPress, showX = false, style, iconSize = 18, }) => {
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { onPress: onPress, hitSlop: hitSlop, accessibilityRole: "button", accessibilityLabel: showX ? "Close" : "Go back", accessibilityHint: showX ? "Dismiss this screen" : "Go back to the previous screen", style: style, children: showX ? ((0, jsx_runtime_1.jsx)(svgs_1.CloseIcon, { fill: color, width: iconSize, height: iconSize })) : ((0, jsx_runtime_1.jsx)(svgs_1.ChevronIcon, { direction: "left", fill: color, height: iconSize, width: iconSize })) }));
|
|
11
11
|
};
|
|
12
12
|
exports.BackButton = BackButton;
|
|
13
13
|
const BackButtonWithBackground = ({ color = "onBackgroundHigh", hitSlop = constants_1.DEFAULT_HIT_SLOP, onPress, showX = false, style, }) => {
|