atlas-design-system 1.15.0 → 1.16.0

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,8 @@ export type NavigationListRowProps = {
7
7
  disabled?: boolean;
8
8
  defaultPadding?: boolean;
9
9
  containerStyle?: StyleProp<ViewStyle>;
10
+ iconRight?: React.ReactNode;
11
+ iconRightName?: string;
10
12
  };
11
- export declare const NavigationListRow: ({ label, caption, onPress, disabled, defaultPadding, containerStyle, }: NavigationListRowProps) => React.JSX.Element;
13
+ export declare const NavigationListRow: ({ label, caption, onPress, disabled, defaultPadding, containerStyle, iconRight, iconRightName, }: NavigationListRowProps) => React.JSX.Element;
12
14
  export default NavigationListRow;
@@ -32,14 +32,14 @@ const react_native_1 = require("react-native");
32
32
  const Ionicons_1 = __importDefault(require("react-native-vector-icons/Ionicons"));
33
33
  const Text_1 = __importDefault(require("../Text"));
34
34
  const useThemedStyle_1 = require("../../hooks/useThemedStyle");
35
- const NavigationListRow = ({ label, caption, onPress, disabled, defaultPadding = true, containerStyle = {}, }) => {
35
+ const NavigationListRow = ({ label, caption, onPress, disabled, defaultPadding = true, containerStyle = {}, iconRight, iconRightName = "chevron-forward-outline", }) => {
36
36
  const styles = useStyles(defaultPadding).styles;
37
37
  return (<react_native_1.TouchableOpacity disabled={disabled} style={[styles.container, containerStyle]} onPress={onPress}>
38
38
  <react_native_1.View style={styles.content}>
39
39
  <Text_1.default category="h3">{label}</Text_1.default>
40
40
  {caption && <Text_1.default contrast="low">{caption}</Text_1.default>}
41
41
  </react_native_1.View>
42
- <Ionicons_1.default style={styles.chevronRight} size={18} name="chevron-forward-outline"/>
42
+ {iconRight ? (iconRight) : (<Ionicons_1.default style={styles.chevronRight} size={18} name={iconRightName}/>)}
43
43
  </react_native_1.TouchableOpacity>);
44
44
  };
45
45
  exports.NavigationListRow = NavigationListRow;
@@ -44,7 +44,7 @@ function RadioOptionInput({ caption, label, options = [], onChange, renderOption
44
44
  const handleOptionPress = (0, react_1.useCallback)((option) => {
45
45
  onChange(option);
46
46
  setSheetOpen(false);
47
- }, []);
47
+ }, [onChange]);
48
48
  return (<>
49
49
  <react_native_1.View style={[styles.container, containerStyle]}>
50
50
  <Text_1.default>{label}</Text_1.default>
@@ -1,2 +1,2 @@
1
- export { default } from "./RadioOptionInput";
1
+ export { default as RadioOptionInput } from "./RadioOptionInput";
2
2
  export * from "./RadioOptionInput";
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.default = void 0;
20
+ exports.RadioOptionInput = void 0;
21
21
  var RadioOptionInput_1 = require("./RadioOptionInput");
22
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(RadioOptionInput_1).default; } });
22
+ Object.defineProperty(exports, "RadioOptionInput", { enumerable: true, get: function () { return __importDefault(RadioOptionInput_1).default; } });
23
23
  __exportStar(require("./RadioOptionInput"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atlas-design-system",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
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",