atlas-design-system 1.10.0 → 1.10.1

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,4 +1,5 @@
1
1
  import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
2
3
  import { Option } from "../SelectInput/types";
3
4
  type RadioOptionInputProps<T> = {
4
5
  caption?: string;
@@ -7,6 +8,7 @@ type RadioOptionInputProps<T> = {
7
8
  onChange: (newValue: Option<T>) => void;
8
9
  renderOption?: (option: Option<T>, onPress: (option: Option<T>) => void) => React.ReactNode;
9
10
  renderValue?: (option?: Option<T>) => React.ReactNode;
11
+ containerStyle?: StyleProp<ViewStyle>;
10
12
  };
11
- export declare function RadioOptionInput<T>({ caption, label, options, onChange, renderOption, renderValue, }: RadioOptionInputProps<T>): React.JSX.Element;
13
+ export declare function RadioOptionInput<T>({ caption, label, options, onChange, renderOption, renderValue, containerStyle, }: RadioOptionInputProps<T>): React.JSX.Element;
12
14
  export default RadioOptionInput;
@@ -35,7 +35,7 @@ const Text_1 = __importDefault(require("../Text"));
35
35
  const Chevron_1 = __importDefault(require("../Chevron"));
36
36
  const RadioOptionItem_1 = __importDefault(require("../RadioOptionItem"));
37
37
  const MenuItemDescription_1 = require("../MenuItemDescription");
38
- function RadioOptionInput({ caption, label, options = [], onChange, renderOption, renderValue, }) {
38
+ function RadioOptionInput({ caption, label, options = [], onChange, renderOption, renderValue, containerStyle = {}, }) {
39
39
  const styles = useStyles().styles;
40
40
  const [sheetOpen, setSheetOpen] = react_1.default.useState(false);
41
41
  const value = (0, react_1.useMemo)(() => {
@@ -46,7 +46,7 @@ function RadioOptionInput({ caption, label, options = [], onChange, renderOption
46
46
  setSheetOpen(false);
47
47
  }, []);
48
48
  return (<>
49
- <react_native_1.View style={styles.container}>
49
+ <react_native_1.View style={[styles.container, containerStyle]}>
50
50
  <Text_1.default>{label}</Text_1.default>
51
51
  <react_native_1.TouchableOpacity onPress={() => setSheetOpen(true)} style={styles.valueDisplayContainer}>
52
52
  {!renderValue && <Text_1.default>{value === null || value === void 0 ? void 0 : value.label}</Text_1.default>}
@@ -64,7 +64,7 @@ function RadioOptionInput({ caption, label, options = [], onChange, renderOption
64
64
  }
65
65
  const useStyles = () => (0, hooks_1.useThemedStyle)((0, react_1.useCallback)((t) => react_native_1.StyleSheet.create({
66
66
  container: {
67
- padding: t.size.baseSize * 4,
67
+ // paddingVertical: t.size.baseSize * 4,
68
68
  },
69
69
  chevron: {
70
70
  paddingRight: t.size.baseSize * 2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atlas-design-system",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "description": "A react native design system for the Atlas workout app",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",