@hoddy-ui/core 1.0.96 → 1.0.98

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoddy-ui/core",
3
- "version": "1.0.96",
3
+ "version": "1.0.98",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -15,7 +15,7 @@ const AdaptiveStatusBar = ({ translucent = false }) => {
15
15
  );
16
16
  if (Platform.OS === "android") {
17
17
  StatusBar.setBackgroundColor(
18
- colors.white[1] + (translucent ? "0" : "")
18
+ translucent ? "transparent" : colors.white[1]
19
19
  );
20
20
  StatusBar.setTranslucent(true);
21
21
  }
@@ -121,8 +121,8 @@ const Button: React.FC<ButtonProps> = forwardRef(
121
121
  ? null
122
122
  : translucent
123
123
  ? translucent === "dark"
124
- ? colors.white[3] + "2"
125
- : colors.black[3] + "2"
124
+ ? colors.white[3] + "22"
125
+ : colors.black[3] + "22"
126
126
  : loading
127
127
  ? colors[color].light
128
128
  : disabled
@@ -11,7 +11,7 @@ import {
11
11
 
12
12
  import React, { useState } from "react";
13
13
  import { ScaledSheet } from "react-native-size-matters";
14
- import { useColors } from "../hooks";
14
+ import { useColors, useTheme } from "../hooks";
15
15
  import { PopupProps } from "../types";
16
16
  import { IconButton } from "./Button";
17
17
  import Typography from "./Typography";
@@ -25,7 +25,9 @@ export const Popup: React.FC<PopupProps> = ({
25
25
  children,
26
26
  open,
27
27
  onClose = () => {},
28
+ style,
28
29
  }) => {
30
+ const theme = useTheme();
29
31
  const colors = useColors();
30
32
  const [show, setShow] = useState(open);
31
33
  const [showSecondary, setShowSecondary] = useState(false);
@@ -47,12 +49,13 @@ export const Popup: React.FC<PopupProps> = ({
47
49
  },
48
50
  container: {
49
51
  paddingBottom: sheet ? "30@ms" : 0,
50
- backgroundColor: colors.white[2],
52
+ backgroundColor: theme === "dark" ? "#111" : colors.white[2],
51
53
  borderTopLeftRadius: 20,
52
54
  borderTopRightRadius: 20,
53
55
  borderBottomRightRadius: sheet ? 0 : 20,
54
56
  borderBottomLeftRadius: sheet ? 0 : 20,
55
57
  width: "100%",
58
+ ...style,
56
59
  },
57
60
  content: {
58
61
  paddingHorizontal: bare ? undefined : "10@ms",
@@ -59,7 +59,7 @@ const SelectMenu: React.FC<SelectMenuProps> = ({
59
59
  style={{
60
60
  ...styles.option,
61
61
  backgroundColor:
62
- item.value === value ? colors.blue.light + "2" : colors.white[2],
62
+ item.value === value ? colors.blue.light + "22" : colors.white[2],
63
63
  }}
64
64
  onPress={() => {
65
65
  onChange(item.value);
@@ -24,7 +24,7 @@ const Spinner: React.FC<SpinnerProps> = ({
24
24
  alignItems: "center",
25
25
  justifyContent: "center",
26
26
  position: fullscreen ? "absolute" : "relative",
27
- backgroundColor: fullscreen ? colors.white[1] + "d" : undefined,
27
+ backgroundColor: fullscreen ? colors.white[1] + "dd" : undefined,
28
28
  ...style,
29
29
  },
30
30
  content: {
package/src/types.ts CHANGED
@@ -220,6 +220,7 @@ export interface PopupProps {
220
220
  children: ReactNode;
221
221
  open: boolean;
222
222
  onClose?: () => void;
223
+ style?: ViewStyle;
223
224
  }
224
225
 
225
226
  export interface SpinnerProps {