@artsy/palette-mobile 14.0.36 → 14.0.37
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.
|
@@ -50,7 +50,7 @@ export const RadioButton = ({ accessibilityState, block, disabled, error, onPres
|
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
onPress?.(event);
|
|
53
|
-
}, children: _jsxs(Flex, { ...restProps, children: [_jsxs(Flex, { flexDirection: "row", alignItems: "center", justifyContent: block ? "space-between" : "flex-start", children: [!block && AnimatedDot, _jsx(Flex, { justifyContent: "center", children: !!text && (_jsx(Text, { variant: textVariant, color: textColor, children: text })) }), block && AnimatedDot] }), _jsx(Flex, { ml: block ? 0 : `${(RADIOBUTTON_SIZE + space(1)) * fontScale}px`, mt: block ? 0 : 0.5, children: !!subtitle && (_jsx(Text, { variant: "xs", color: subtitleColor, children: subtitle })) })] }) }));
|
|
53
|
+
}, children: _jsxs(Flex, { ...restProps, children: [_jsxs(Flex, { flexDirection: "row", alignItems: "center", justifyContent: block ? "space-between" : "flex-start", width: block ? "100%" : undefined, children: [!block && AnimatedDot, _jsx(Flex, { justifyContent: "center", children: !!text && (_jsx(Text, { variant: textVariant, color: textColor, children: text })) }), block && AnimatedDot] }), _jsx(Flex, { ml: block ? 0 : `${(RADIOBUTTON_SIZE + space(1)) * fontScale}px`, mt: block ? 0 : 0.5, children: !!subtitle && (_jsx(Text, { variant: "xs", color: subtitleColor, children: subtitle })) })] }) }));
|
|
54
54
|
};
|
|
55
55
|
// styled-component does not have support for Animated.View
|
|
56
56
|
const styles = (fontScale) => StyleSheet.create({
|
|
@@ -18,7 +18,9 @@ storiesOf("RadioButton", module).add("Default", () => {
|
|
|
18
18
|
setMetric("cm");
|
|
19
19
|
}, selected: metric === "cm", text: "centimeters" }), _jsx(RadioButton, { onPress: () => {
|
|
20
20
|
setMetric("in");
|
|
21
|
-
}, selected: metric === "in", text: "inches" })] }),
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
}, selected: metric === "in", text: "inches" })] }), _jsxs(Flex, { children: [_jsx(RadioButton, { onPress: () => {
|
|
22
|
+
setMetric("cm");
|
|
23
|
+
}, block: true, selected: metric === "cm", text: "Centimeters" }), _jsx(RadioButton, { onPress: () => {
|
|
24
|
+
setMetric("in");
|
|
25
|
+
}, block: true, selected: metric === "in", text: "Inches" })] })] }));
|
|
24
26
|
});
|
package/package.json
CHANGED